Sensor for detecting the level of a medium

ABSTRACT

A sensor for detecting the level of a medium contained in a container, in particular a tank, comprises: an array of capacitive elements designed to be associated to the container (1), in particular so as to extend according to an axis of detection (X) of the level of the medium (L), the array of capacitive elements comprising a plurality of electrodes (J1-Jn), in particular on a face of an electrically insulating substrate (20) having a generally elongated shape, the electrodes (J1-Jn) being spaced apart from one another, in particular along the detection axis (X), and being preferably substantially coplanar with one another; at least one insulation layer (16) for insulating electrically the electrodes (J1-Jn) with respect to the inside of the container (1); and a controller (24) having a plurality of inputs. Each capacitive element comprises a set of electrodes connected together in common, in particular in parallel, each set of electrodes being connected to a respective input of the plurality of inputs. The controller (24) is pre-arranged for discriminating a value of capacitance associated to each electrode (J1-Jn) in order to deduce the level of the medium present container.

This application is the U.S. national phase of International ApplicationNo. PCT/IB2015/057036 filed Sep. 14, 2015 which designated the U.S. andclaims priority to IT Patent Application No. TO2014A000725 filed Sep.15, 2014, the entire contents of each of which are hereby incorporatedby reference.

FIELD OF THE INVENTION

The present invention relates to a sensor for detecting the level of ageneric medium, such as a liquid, a fluid substance, a powdery material,or a material in the bulk state, etc. The invention has been developedwith particular reference to level sensors of a capacitive type used onvehicles.

PRIOR ART

Level sensors are used in various contexts for detecting a residualamount of a liquid present in a generic container, such as a tank. Someof these sensors are based upon the use of a float. These sensors are ingeneral complicated from the mechanical standpoint and present somecritical aspects, such as risks of jamming. These sensors are inevitablyaffected by problems linked to possible freezing of the mediumundergoing measurement.

Also known are level sensors based upon the measurement of electricalquantities, such as conductivity/resistivity or capacitance. Thesesensors usually have an array of first electrodes, arranged according tothe level-detection axis, which is generally vertical, on acorresponding insulating substrate that is to be installed inside thetank. The sensors then have a similar array of second electrodes, setbetween or facing those of the first array, in such a way that the fluidthe level of which is to be measured penetrates between the electrodesof the two arrays. In some solutions, instead of a plurality of secondelectrodes, a common electrode is provided, having a height at leastequal to that of the first array. In other solutions still, it is thetank itself that has an internal surface rendered electricallyconductive, for example via a metallization surface, in order tofunction as common electrode. The electrodes are electrically connectedto a circuit arrangement, frequently including a microcontroller, which,by processing the value of the electrical quantity detected between theelectrodes, is able to identify an area of transition between the liquidand the air in the tank, which is considered indicative of the level ofthe liquid.

In these known solutions, the electrodes are directly in contact withthe liquid and hence subject to ageing and to early wear. Operation ofthese sensor systems is then strictly linked to the characteristics ofthe fluid, such as its conductivity/resistivity or its dielectricconstant.

With reference to level sensors of a capacitive type, these typicallyenvisage at least two mutually facing electrodes, between which theliquid the level of which is to be detected is to penetrate, with theelectrodes that are excited via an oscillator circuit, i.e., a circuitthat generates an a.c. or frequency-modulated electrical signal. Thecircuit detects a variation of the capacitance between the facingelectrodes that is proportional to the variation of the dielectric setbetween the electrodes, i.e., proportional to the level of the liquidset in between, and hence of the capacitance of the sensor element. Inthese sensors an output signal is thus obtained proportional to theaforesaid variation of capacitance. Known sensors of this type envisageconfigurations with a respective impedance, which may even behave asantennas and present the problem of generating electromagneticinterference (EMI), this disturbance being such as to interfere withother electronic systems, such as the electronic circuits on board thevehicle. This phenomenon increases with the increase of the extension ofthe electrodes, i.e., with the increase of the length of the levelsensor, which could behave as a transmitting antenna.

Further types of capacitive sensors envisage execution of a measurementbetween at least two coplanar electrodes, for example in comb-fingered(interdigitated) configuration, that face an insulating wall thatseparates them from the liquid, where the presence of liquid beyond theinsulating wall substantially determines a variation of the dielectricbetween the two electrodes set alongside one another, thus enablingdetection. A sensor of this type is known, for example, from U.S. Pat.No. 7,258,005 B2. In these cases, the spacing between the two electrodesmust be greater than the thickness of the insulating wall, typicallygreater than twice the wall thickness (i.e., the sum of the thicknessesof the wall set between each of the two electrodes and the fluid to bedetected) in such a way that the possible presence of liquid caneffectively perturb the capacitance between the electrodes. In additionto causing problems of encumbrance, a solution of this kind presentslimits in the measurement resolution or precision.

Other types of capacitive sensor are mounted on the outside of a tank,such as a tank for fuel or for an additive in a vehicle. These types ofsensor are, however, penalized by the fact that the tank must envisagelarge wall thicknesses in order to guarantee the necessary mechanicalstrength. This entails the need to use signals in frequency havinghigher power in order to detect the level of the liquid in the tank, andthis determines greater risks for the aforesaid electromagneticinterference.

SUMMARY AND OBJECT OF THE INVENTION

In its general terms, the object of the present invention is to providea level sensor that is simple and inexpensive to produce, distinguishedby a high flexibility of use and construction and substantially immunefrom the problems highlighted above.

According to a first aspect, the object of the invention is to provide alevel sensor that can be produced in different lengths, albeitguaranteeing precision and reliability.

According to a different aspect, the object of the invention is toprovide a sensor that is suitable for carrying out measurements of leveleven in conditions of at least partial solidification or freezing of themedium undergoing measurement.

According to a different aspect, the object of the invention is toprovide a level sensor that is able to distinguish the presence and/orthe height of different layers and/or different states of the mediumundergoing measurement, such as a sequence of states and/or layers ofthe type “liquid—air/gas—solid” or else of the type “liquid—solid”, orelse of the type “air/gas—solid”, or again of the type “liquid—air/gas”.

According to a different aspect, the object of the invention is toprovide a level sensor that is able to detect variations in height ofdifferent layers and/or states of the medium undergoing measurement,such as an increase or reduction of an icy or solidified layer of themedium, for example a measurement of the variations of level in a tankthat contains a liquid during freezing and/or unfreezing.

According to a different aspect, the object of the invention is toprovide a level sensor having a structure designed to enable preciseoperation thereof even in the face of stresses due to conditions offreezing and/or solidification and/or heating of the medium undergoingmeasurement.

At least one of the purposes of the invention is achieved by a levelsensor and by a corresponding control method having the characteristicsspecified in the annexed claims. The claims form an integral part of thetechnical teaching provided herein in relation to the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Further objects, characteristics, and advantages of the invention willemerge from the ensuing description, with reference to the annexeddrawings, which are provided purely by way of non-limiting example andin which:

FIGS. 1 and 2 are partially sectioned schematic perspective views of twopossible alternative configurations of installation of a level sensoraccording to the invention on a generic container, such as a tank;

FIGS. 3 and 4 are schematic perspective views, from different angles, ofa level sensor according to one embodiment of the invention;

FIG. 5 is a partially sectioned schematic perspective view of a levelsensor according to a possible embodiment of the invention;

FIG. 6 is a partial exploded schematic view of a level sensor accordingto a possible embodiment of the invention;

FIGS. 7 and 8 are schematic perspective views from different angles of acircuit of a level sensor according to a possible embodiment of theinvention;

FIG. 9 is a schematic longitudinal section of a level sensor accordingto a possible embodiment of the invention;

FIG. 10 is a first detail at a larger scale of the sensor of FIG. 9;

FIG. 11 is a detail at a larger scale of the sensor of FIG. 10;

FIG. 12 is a second detail at a larger scale of the sensor of FIG. 9;

FIG. 13 is a schematic cross-sectional view of a sensing portion of alevel sensor according to a possible embodiment of the invention;

FIG. 14 is a detail at a larger scale of the sensor of FIG. 13;

FIG. 15 is a detail at a larger scale of the sensor of FIG. 14;

FIGS. 16, 17, and 18 are partial and schematic perspective views ofpossible alternative configurations of installation or fixing of a levelsensor according to a possible embodiment of the invention;

FIG. 19 is a partial and schematic perspective view of a portion of acontainer to which a level sensor according to FIG. 18 can beassociated;

FIG. 20 is a partial and schematic representation aimed at illustratinga possible configuration of connection of electrodes of a level sensoraccording to a possible embodiment of the invention;

FIG. 21 is a partial and schematic representation aimed at exemplifyinga possible circuit configuration of a level sensor according to FIG. 20;

FIG. 22 is a partial and schematic representation similar to that ofFIG. 21, aimed at exemplifying an alternative circuit configuration of alevel sensor according to FIG. 20;

FIGS. 23 and 24 are schematic representations aimed at illustratingfurther possible configurations of connection of electrodes of levelsensors according to possible alternative embodiments of the invention;

FIG. 25 is a partial and schematic representation aimed at exemplifyinga possible circuit configuration of a level sensor according to FIG. 24;

FIG. 26 is a schematic representation, via graphs, aimed at exemplifyinga possible principle of interpretation of electrical signals or valuesused in possible embodiments of the invention;

FIGS. 27 and 28 are schematic representations similar to those of FIGS.20, 23, and 24, aimed at illustrating further possible configurations ofconnection of electrodes of level sensors according to possiblealternative embodiments of the invention;

FIG. 29 is a schematic representation of some circuit elements of alevel sensor according to a possible embodiment of the invention;

FIG. 30 is a partial and schematic representation similar to that ofFIG. 25, aimed at exemplifying a further possible condition of use of alevel sensor according to a possible embodiment of the invention;

FIG. 31 is a partially sectioned schematic perspective view of apossible variant embodiment of a level sensor according to theinvention; and

FIG. 32 is a partial and schematic representation aimed at exemplifyinga circuit configuration alternative to that of FIG. 25.

DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION

Reference to “an embodiment” or “one embodiment” in the framework of thepresent description is meant to indicate that a particularconfiguration, structure, or characteristic described in relation to theembodiment is comprised in at least one embodiment. Hence, phrases suchas “in one embodiment”, “in one embodiment”, and the like that may bepresent in different points of this description do not necessarily referto one and the same embodiment, but may instead refer to differentembodiments. Moreover, particular conformations, structures, orcharacteristics defined in the course of the present description may becombined in any adequate way in one or more embodiments, even differentfrom the ones shown. The numeric and spatial references (such as“upper/top”, “lower/bottom”, “up”, “down”, “front”, “back”, “vertical”,etc.) used herein are merely provided for convenience and hence do notdefine the sphere of protection or the scope of the embodiments. In thefigures, the same reference numbers are used to indicate elements thatare similar or technically equivalent.

In FIG. 1, designated as a whole by 1 is a generic container, inparticular a tank, for a generic medium in the fluid or bulk state. Thetank 1 has a main body preferably made of electrically insulatingplastic material. To the tank 1 there may be associated a heater of atype in itself known, used for heating the tank itself and/or itscontents, for example in the event of freezing. An electrical heater isrepresented schematically in the figure by the block designated by EH.

The tank 1 may, for example, be a tank that equips a motor vehicle. Inone embodiment, such as the one exemplified herein, the tank 1 isdesigned to equip a vehicle with diesel engine, and the liquid containedin the tank 1 is a liquid known as AdBlue, i.e., a solution of urea at32.5% (minimum 31.8%-maximum 33.3%) in demineralized water, used by anSCR (Selective Catalyst Reduction) system, i.e., a system for reducingemissions of nitrogen oxides from the exhaust gases produced by a dieselengine.

In the schematic example illustrated, the tank has an upper wall 2, onwhich an opening is provided having a plug 3 for topping-up. A wall ofthe tank 1, for example its bottom wall 4, then has an outlet opening,not visible, via which the liquid comes out or is drawn, for example viaa pump, to supply the liquid to the SCR system. Once again on the upperwall 2, the tank 1 has a second opening, designated by 5, fixed in aposition corresponding to which in a fluid-tight way is the body of alevel sensor according to a possible embodiment. The level sensor,designated as a whole by 10, is mounted so as so as to extend accordingto a level-detection axis, designated by X, preferably substantiallyvertical but possibly, if need be, inclined with respect to thevertical.

The sensor 10 has a sensing part 11, designed so as to extend at leastpartially inside the tank 1. The distal end region of the sensing part11 is preferably in contact with or at a slight distance from the bottomwall 4 of the tank, i.e., at a height very close to that of the openingfor outlet or drawing-off of the liquid, in order to be able to detectthe presence of an even very low level in the tank. In an embodiment notrepresented, the distal end region of the sensing part 11 is fixed onthe inside of the wall of the tank 1 opposite to the wall provided withthe opening 5 where the sensor 10 is installed and fixed, preferably viaa quick-release coupling or attachment. Preferably, the proximal endregion of the sensing part 11 extends inside the tank 1 up to a heightrelatively close to the upper wall 3.

In the embodiment illustrated, the body of the sensor 10 has, in itsupper part, elements for fixing thereof to the upper wall 2 of the tank.In the example, these means are represented by flange formations withassociated screws (not represented). This embodiment must not in anycase be understood as limiting, there being also possible differentsolutions for fixing the body of the sensor 10, some of which areexemplified hereinafter.

In the example of FIG. 1, the sensor 10 is fixed from above, i.e.,associated to the upper wall 2 of the tank. In other embodiments,however, the sensor may be fixed from beneath, i.e., to the bottom wall4. An embodiment of this type is illustrated schematically in FIG. 2,where the sensor 10 is mounted in a fluid-tight way in a positioncorresponding to the opening 5, here defined in the bottom wall 4. Alsoin this embodiment, a proximal end region (which here may be defined aslower) of the sensing part 11 is in a position close to the bottom wall4, whereas the distal end region (which here may be defined as upper) isat a height relatively close to the upper wall 3. Also in a solution ofthis type, the distal end of the part 11 may be fixed to the wall 3 viasuitable coupling means of the type indicated above.

In FIGS. 3 and 4, a sensor 10 according to one embodiment is representedin isolation, from different angles. At the proximal end of the part 11,the body 10 a of the sensor 10 defines a box-like housing 12, which alsoincludes a generally hollow connector body 12 a, provided withelectrical terminals described hereinafter, which preferably projectsfrom a side wall of the housing. The housing 12 is preferably providedwith a closing lid 13, which can be secured in position in a fluid-tightway, for example via a welding between the plastic material of thehousing 12 and the plastic material of the lid 13.

Between the housing 12 and the part 11 the body 10 a of the sensor 10preferably defines a portion or formation 14 for fluid-tight coupling ina position corresponding to the respective installation opening on thetank. The formation 14 defines at least one seat for at least onesealing element 15, which may also fulfil functions of elastic mountingof the sensor 20 on the tank. In one embodiment, at least two elasticelements of an O-ring type are provided, one of which fulfils sealingfunctions and the other is exploited to obtain elastic mounting of thesensor 10 on the tank 1, for example in order to compensate for assemblytolerances. In the example illustrated, the formation 14 has asubstantially circular profile, and the sealing element is an O-ring.Designated then by 12 b in FIGS. 3 and 4 are the aforementioned flangeformations for fixing the body 10 a of the sensor, which are heredefined on the bottom of the housing 12.

In FIG. 5, a sensor 10 according to one embodiment is representedpartially sectioned in order to highlight how its body 10 a isinternally hollow in order to house the level-detection components. Fromthe figure is may be noted in particular how the body 10 a of the sensordefines, in a position corresponding to the sensing part 11, a hollowcasing 16, having a generally elongated shape. In the exampleillustrated, the casing 16 has a generally prismatic shape, inparticular substantially parallelepipedal. As will be seen, in a variantembodiment, at least the casing 16 may be obtained via a directover-moulding of electrically insulating plastic material on a circuitsubstrate, described hereinafter. More in general, the sensor 10 has atleast one insulation layer, for insulating electrically its electrodes(described hereinafter) with respect to the inside of the tank 1.

In a preferred embodiment, the housing 12 with the formation 14 and thecasing 16 are defined by a single body 10 a made of electricallyinsulating plastic material, as may be clearly seen, for example, inFIG. 6. Not excluded, on the other hand, from the invention is anembodiment of the body 10 a in distinct parts rendered fixed withrespect to one another in a fluid-tight way, for example viamutual-coupling means, or else via welding or overmoulding.

In one embodiment, the body 10 a, or at least its portion designed forbeing directly or indirectly exposed to the liquid (the casing 16 andpossibly the attachment portion 14) is made of a mouldable thermoplasticmaterial, such as polypropylene (PP), or of a high-density polyethylene(HDPE). Practical tests conducted by the present applicant have, on theother hand, made it possible to ascertain that a particularly suitablematerial—also in view of the particular level-detection modalitiesdescribed hereinafter—is a cyclic-olefin copolymer (COC). Materials ofthis type, usually employed in the medical field, present particularlyadvantageous characteristics for the application considered herein,amongst which there may be cited low density, very low water absorption,excellent barrier properties in regard to water vapour, high stiffness,strength, and hardness, high resistance to extreme temperatures andthermal shocks, excellent resistance to aggressive agents such as acidsand alkali, excellent electrical-insulation properties, and easyworkability using ordinary methods of treatment of thermoplasticmaterials, such as injection moulding, extrusion, blow moulding,injection blow moulding.

The material, or at least one of the materials used for providing thebody 10 a of the sensor 10, may be similar to or chemically compatiblewith a material that provides at least part of the tank 1, for examplein order to enable a fluid-tight welding between the body of the sensorand the tank. One or more of the materials indicated above may be usedto provide different portions of the body 10 a, such as the housing 12with the formation 14 and the casing 16, even when the body 10 a is madeof distinct pieces rendered fixed with respect to one another. Ofcourse, also the lid 13 may be obtained with one of the materialsindicated.

Once again in FIG. 5, it may be noted how housed in the cavity definedby the body of the sensor 10, designated as a whole by H, are theelectrical and electronic detection components. In a preferredembodiment, these components are mounted on an electrically insulatingsubstrate 20 that provides a circuit substrate. The substrate 20 is madeof a material suitable for creating printed circuits, such as forexample FR4 or a similar composite material such as fibreglass, or againa polymer-based ceramic material, preferably a material that can bemoulded to enable production of the substrate 20.

In the circuit substrate 20 there may be identified a first portion 20a, that is to be received in the housing 12, and a second portion 20 bthat is to be received in the casing 16. Associated to the portion 20 aof the substrate 20 are prevalently the control electronic components ofthe sensor 10, as well as corresponding terminals for externalelectrical connection of the sensor 10. Associated, instead, to theportion 20 b of the substrate 20 are the detection components, includinga series of electrodes. Some of these electrodes are designated in FIG.5 by the letter “J” followed by the number that identifies the positionof the electrode in the series that extends from the proximal end(electrode J₁) to the distal end (electrode J_(n)) of the sensing part11, i.e., of the portion 20 b of the substrate 20.

In the example illustrated, a single circuit substrate is provideddefined in which are the parts 20 a and 20 b, but in possible variantembodiments there may be provided a number of circuit substratesconnected together by means of suitable electrical interconnection meansand possibly mechanical interconnection means (for example, a circuitsubstrate corresponding to the portion 20 a and a circuit substratecorresponding to the portion 20 b, with electrical conductors orconnectors for connecting electrically conductive paths of one portionto electrically conductive paths of the other portion).

In FIG. 6 a sensor 10 according to one embodiment of the invention isrepresented in exploded view, where there may be appreciated the variousparts already identified above. Visible in this figure are theaforementioned terminals, designated by 21, preferably having agenerally flat shape, for example obtained via moulding and/or blankingfrom metal strap, which provide, with the connector body 12 a fixed withrespect to the housing 12, an interface for external connection of thesensor 10, for example, to a control unit of the SCR system on board thevehicle.

In one embodiment, each terminal 21 has a lamina-shaped contact portion21 a, designed for positioning of the connector body 12 a inside thecavity and a narrow interconnection portion 21 b, designed forelectrical and mechanical coupling with respective contacts 22 presenton the substrate 20, in particular in its portion 20 a, which aredescribed hereinafter.

Once again visible in FIG. 6 is the substrate 20 as a whole, with thecorresponding parts 20 a and 20 b, with associated electrical andelectronic components. The substrate 20 is also represented in isolationin FIGS. 7 and 8, which represent opposite views of its major faces. Thecircuit substrate 20, of a generally elongated and preferably flatshape, has associated on one of its major faces, here definedconventionally as “back”, a control circuit arrangement, designated as awhole by 23, preferably comprising an electronic controller 24, forexample a microcontroller. The controller 24 preferably comprises atleast one processing and/or control logic unit, a memory circuit, andinputs and outputs, among which inputs of an analog/digital type.

The components of the circuit arrangement 23 are connected toelectrically conductive paths provided in the portion 20 a, which arevisible for example in FIG. 8 (without any reference number). On theback of the portion 20 b of the substrate there is then provided aseries of electrically conductive paths 25, for electrical connection ofthe electrodes J of FIG. 5—preferably with metallized through holes forconnection between paths on different surfaces—and of possible othercomponents to the arrangement 23.

In one embodiment, the circuit comprises at least one temperaturesensor, in particular provided on the corresponding circuit substrate20. Such a sensor, for example of an NTC type, may be mounted on atleast one of the distal end region and the proximal end region of theportion 20 b of the substrate 20. In the example represented, mounted onthe portion 20 b of the substrate 20, in particular on its back, are twotemperature sensors 26 and 27, in opposite end regions of the portion 20b, connected to the circuit arrangement 23 via corresponding conductivepaths. Assuming an installation of the sensor 10 in the tank 1 of thetype illustrated in FIG. 2, the temperature sensor 27 may be used fordetecting the temperature of the liquid, whereas the sensor 26—which inthe installed condition is closer to the upper wall of the tank—may beused for detecting the temperature in the internal volume of the tankabove of the liquid, for example the temperature of the air. Aconfiguration of the type represented, in particular with twotemperature sensors 26 and 27, enables installation of the sensor 10 inthe tank 1 either in the configuration of FIG. 1 or in the configurationof FIG. 2, by inverting, at a software level, the functions, such as thefunctions of the two sensors and/or the functions of the electrodes J.

A sensor for detecting temperature may be provided within the portion 20a of the substrate, i.e., within the housing 12. It may also of coursebe possible to provide more than two temperature sensors, for examplewith one or more sensors in intermediate positions between those of thesensors 26 and 27.

Clearly visible in FIG. 8 is the front of the substrate 20, in theportion 20 b of which the electrodes J are arranged, just some of whichare shown. In the non-limiting example represented, the electrodesJ—which are thirty-seven in number—are arranged according to an arraythat extends according to the direction of length of the portion 20 b ofthe substrate, i.e., along the detection axis X, spaced apart from oneanother. The electrodes J are made of electrically conductive material,for example a metal material or a metal alloy, and are associated to thefront of the portion 20 b of the substrate 20. The electrodes J arepreferably coplanar and may, for example, be in the form of plates orlaminas etched or applied on the substrate 20, or else constituted by anelectrically conductive layer—in a way similar to the paths 25—that isdeposited on the substrate 20, for example with silk-screen printingtechnique or the like.

As has been mentioned, in one embodiment, the substrate 20 has throughholes—partially visible in FIGS. 7 and 8, where one is designated byF—containing conductive material for electrical connection between theelectrodes J provided on the front of the portion 20 b and theconductive paths 25 present on the back of the portion 20 b of thesubstrate 20.

To return to FIG. 6, visible therein is a part of the blind cavity Hthat extends axially in the body 10 a of the level sensor, i.e., in itsparts 12, 14, and 16. Within this cavity H there are preferably providedguide and positioning elements for the substrate 20, some of which arepartially visible in FIGS. 5 and 6, where they are designated by 16 aand 12 c, in a position corresponding to the casing 16 and in a positioncorresponding to the housing 12, respectively. Positioning elements forthe substrate 20 may possibly be provided also in the lid 13.

In FIG. 9, the level sensor 10 is visible in a longitudinal section,from which there may clearly be noted the presence of the blind cavity Hthat extends in the housing 12, in the attachment formation 14, and inthe casing 16, in the cavity H there being housed the circuit substrate20. From this figure, it may clearly be noted how, in one embodiment,the temperature sensor 27 is set in a position close to the formation 14or, more in general, in an installed condition of the sensor 10, in aposition close to the wall of the tank 1 provided with the opening forinstallation of the sensor 10. From a comparison between FIGS. 7-8, onthe one hand, and FIG. 9, on the other, it may moreover be appreciatedthat also the electrode designated by J₁ is, in the installed conditionof FIG. 2, in a position close to the bottom wall of the tank,preferably a position that can be reached by the liquid even in acondition of albeit minimal filling of the tank. As will be seen, in oneembodiment, the electrode J₁, in combination with at least one furtherelectrode J at a different potential or voltage, is used for supplying areference value used in the course of detection of the level of theliquid.

Also visible in FIG. 9 is the connector body 12 a, with one of thecorresponding terminals 21. The terminals 21 may be interference fittedin corresponding passages defined in the connector body 12 a, orpossibly at least the body of the housing 12 may be overmoulded on theterminals. Preferably, the terminals, and the corresponding passages ofthe connector body, extend longitudinally in a direction substantiallyperpendicular to a plane identified by the circuit substrate 20 and/orby the electrodes J.

In one embodiment, the contacts 22 are configured for elastic couplingwith the terminals 21 in order to obtain electrical and mechanicalconnection with one another. Visible in FIG. 10, and in even greaterdetail in FIG. 11, is a possible modality of coupling between theportion 21 b of a terminal 21 with a corresponding contact 22 providedin the portion 20 a of the substrate.

In the embodiment exemplified (see in particular FIG. 11) the contactshave a plane base 22 a provided with a central hole or passage 22 b.Departing from the base 22 a, on opposite sides of the passage 22 b, areat least two tabs 22 c converging towards one another. The body of thecontacts 22 is made of an electrically conductive material, such as ametal or a metal alloy, for example phosphorous bronze, preferablycoated with tin or gold or other material designed to improve electricalcontact.

The tabs 22 c are inserted in a corresponding through hole 20 c definedin the portion 20 a of the substrate, and the base 22 a is fixed and/orsoldered to a surface of the substrate itself or to its conductivepaths. Preferably, the hole 20 c is surrounded by the electricallyconductive material of one of the paths of the layout of the circuitarrangement 23, with the base 22 a of the contact 22 that at leastpartially overlaps the aforesaid conductive material so as to obtain theelectrical connection. As visible also in FIG. 11, in the assembledcondition, the passage 22 b of one contact is substantially aligned withthe hole 20 c of the substrate 20, with the base 22 a set up against asurface of the substrate itself (here the rear surface) and with thetabs 22 c that preferably project from the hole 20 c on the oppositesurface (here the front surface) of the substrate 20.

For the purposes of assembly of the sensor, the substrate 20, alreadyprovided with the corresponding electrical and electronic components, isinserted into the cavity H of the body 10 a of the sensor 10 from itsopen part, i.e., from the housing 12. Hence, following upon insertion,the portion 20 b of the substrate 20 is prevalently positioned withinthe casing 16, whereas the portion 20 a is positioned within the housing12. The position of the contacts 22 and of the holes 20 c on thesubstrate 20 is such that, following upon the aforesaid insertion of thesubstrate 20 into the body 10 a, these holes and contacts face thepassages inside the connector body 12 b. The terminals 21 are theninterference fitted into the corresponding passages of the connectorbody 12 a in such a way that the respective interconnection portions 21b penetrate into the holes 22 a and 20 c of the contacts 22 and of thesubstrate 20, respectively. The portions 21 b of the terminals thenpenetrate between the tabs 22 c, causing elastic divarication thereof,which guarantees an adequate electrical connection and a well-balancedmechanical connection. Preferably, the above elastic electricalconnection is also suitable for preventing any possible damage to thesubstrate 20 and to the corresponding circuit, due for example topossible mechanical stresses during use of the sensor 10, such asvibrations or stresses applied on the terminals 21.

It will be appreciated that assembly of the sensor is very simple andreadily automatable, entailing operations in themselves elementary,represented by insertion of the circuit substrate 20 into the cavity Hof the body 10 a and subsequent drive fitting of the terminals 21 intothe corresponding passages of the connector body 12 a.

As has been mentioned, in one embodiment, the body 10 a of the sensor 10is provided with positioning and/or guide elements for the substrate 20.The presence of these elements simplifies further assembly of the sensor10, at the same time guaranteeing a high precision of assembly betweenthe parts and a greater measurement precision. The aforesaid positioningelements may be provided within at least one of the housing 12 and thecasing 16, preferably both in the housing and in the casing. As alreadymentioned, one or more positioning elements may be provided in the lid13 of the housing 12.

With reference for example to FIGS. 10 and 11, in one embodiment,defined on the inside of each of two opposite side walls of the housing12 are insertion and positioning guides, designated by 12 c, which aregenerally parallel to one another and between which there may be engagedan edge region of the substrate 20, in particular of its portion 20 a.In the example illustrated, the guides 12 c are defined in relief on theinner surface of the aforesaid opposite walls of the housing 12 (see inthis regard also FIG. 6, in which the top of a guide 12 c is visible),but not excluded from the scope of the invention is an embodiment inwhich guides having purposes similar to those of the guides 12 c areconstituted by recesses that extend in the longitudinal direction of thebody of the sensor 10. Preferably, the top of the guides 12 c is shapedso as to have a centring lead-in portion, here defined by an inclinedsurface, designed to facilitate introduction of the opposite edges ofthe portion 20 a of the substrate in the respective pairs of guides 12c. The portion 20 a of the substrate 20 may be inserted with slightinterference between the guides 12 c or with a minimal play.

From FIG. 10 it may also be appreciated how, in a preferred embodiment,also the lid 13 has, on the inside of its top wall, a positioningformation 13 a, defining a seat for the proximal or upper edge (asviewed in the figure) of the portion 20 a. Also in this case,preferably, the positioning formation 13 a is shaped so as to define acentring lead-in portion, here comprising two converging inclinedsurfaces, in order to facilitate introduction of the proximal or upperedge of the portion 20 a in the corresponding seat when the lid 13 ismounted on the housing 12. The formation 13 a preferably comprises acontrast surface or element 13 b suitable for preventing undesirableaxial movements of the substrate 20.

In a preferred embodiment, defined between the distal end of the casing16 and the distal end of the substrate 20 (i.e., of its portion 20 a) isa free space or clearance, in particular to enable compensation ofpossible different degrees of thermal expansions of the material thatconstitutes the casing 16 and of the material that constitutes thesubstrate 20. Such a clearance is designated by H₁ in FIG. 12, whichrepresents an enlarged detail of the sensor of FIG. 9, in particular ofthe distal end portion of the sensor 10. In order to clarify thisaspect, it should be considered that a preferential context of use ofthe sensor 10, which is the vehicles sector, envisages reaching of verylow temperatures, for example as low as −40° C., while the device is,instead, produced substantially at room temperature, for example at 25°C. With reference to this numeric example, the sensor 10 hence undergoesa considerable thermal swing, to which there corresponds variableshrinkage of the casing 16 according to the plastic material used.

On the hypothesis of having the above temperature jump of 65° C. (from+25° C. to −40° C.), the clearance H₁ is hence envisaged so as to enablefree contraction of the casing 16, without it coming into contact withthe distal end or edge of the substrate 20 and/or a clearance H₁ isenvisaged such as to prevent the above contraction of the casing 16 frompossibly damaging one or more electrodes J. With reference to thematerials mentioned previously, the following values of thermalexpansion may be considered:

-   -   HDPE=>200 ppm/° C.    -   PP=>120 ppm/° C.    -   COC=>60 ppm/° C.    -   FR4 (substrate 20)=>20 ppm/° C.

Considering now the formula H₁ (mm)=unit h (mm/mm)×length Lu of thesensor (mm), for the temperature jump given here by way of example (65°C.) the following values of unit h may be considered:

-   -   h for HDPE=0.012 mm/mm    -   h for PP=0.007 mm/mm    -   h for COC=0.003 mm/mm

Consequently, for example for a sensor body 10 with Lu=150 mm made ofHDPE, the minimum value of H₁ is 0.012×150=1.8 mm; for a sensor body ofidentical length Lu made of PP, the minimum value of H₁ is0.007×150=1.05 mm; for the same sensor body made of COC, the minimumvalue of H₁ is 0.003×150=0.45 mm.

In a preferred embodiment, the portion 20 b of the circuit substrate 20is positioned within the casing 16 of the body 10 a of the level sensorin such a way that its front, i.e., its face provided with theelectrodes J, is adjacent to or set up against the corresponding innersurface, preferably at least partially in contact therewith. For thispurpose, preferably, inside the casing 16 one or more positioningelements are provided, which tend to urge the portion 20 b of thesubstrate towards a wall of the casing 16. In one embodiment, projectingfrom the inside of one wall of the casing 16 is at least one aforesaidpositioning element, which extends in the direction of the opposite wallof the casing itself.

A possible embodiment in this sense is visible in FIG. 13, which is across-sectional view of the casing 16 (in particular according to aplane orthogonal to the axis X, passing for example through the lineXIII-XIII of FIG. 4). From this figure it may be noted how projectingfrom the inside of one of the major walls of the casing 16 are tworeliefs 16 a (one of which is visible also in FIGS. 5 and 9), which aregenerally parallel to one another and extend in the longitudinaldirection of the casing, preferably but not necessarily throughout itslength (these reliefs possibly presenting intermediate interruptions).The reliefs 16 a, here defined integrally by the body 10 a or by thecasing 16, preferably have a tapered profile in such a way that agenerally pointed or thinned-out top thereof is pressed against the backof the portion 20 b of the substrate 20. As may be appreciated,following upon insertion of the substrate 20 into the cavity H, thereliefs 16 a are designed to urge the front of the part 20 b against theinner surface of the wall of the casing 16 opposite to that from whichthe reliefs themselves rise. This stress advantageously has an elasticcomponent, due to a certain elasticity of the plastic materialconstituting the casing 16.

In one embodiment, the positioning element 16 or each positioningelement 16 is made of a material different from that of the casing 16,such as an elastomer, for example mounted or comoulded or overmoulded onthe casing 16 and/or have another shape different from the onerepresented, albeit designed to operate so as to exert thrust and/oroperate in an elastic way on the substrate 20 and the electrodes J.

In a preferred embodiment, the relief or reliefs 16 a is/are configuredso as to be able to yield elastically and/or undergo deformation atleast in its/their top area in order to enable insertion of thesubstrate 20 even in the case where the thickness of the latter isgreater than the distance between the tip of the relief or reliefs 16 aand the inner surface of the casing 16 facing the above tip (a conditionthat may arise as a result of dimensional tolerances due to differentdegrees of shrinkage of the plastic material during the correspondingmoulding process), in any case guaranteeing the aforesaid thrust.

In one embodiment, introduced inside the casing 16, or in any case atleast of the substrate 20 and the corresponding facing wall of thecasing 16 a, is a fluid filling material that is not electricallyconductive, such as an electrically insulating fluid material, in orderto ensure preferably absence of air bubbles—in particular between theelectrodes J and the casing 16—that could vitiate proper measurement ofthe level, which is carried out according to the modalities describedhereinafter. The aforesaid filling material, which preferably isdesigned to encapsulate and/or be in contact with at least the portion20 b of the substrate 20, may for example be a polyurethane resin or,preferably, a gel, very preferably a silicone gel. A silicone gelsuitable for the application is, for example, the one called SilGel®612, marketed by Wacker Chemie AG, Munich, Germany.

The presence of the filling or insulating or gel material, for brevityin what follows also defined only as “gel”, has principally the functionof filling the possible gaps that arise between the front of the portion20 b of the sensor and the wall of the casing 16 facing it. These gaps,albeit of minimal volume, may exist, for example, on account of thesurface roughness of the substrate 20 and/or of the electrodes J, oragain when the electrodes J have a thickness that determines a slightprojection thereof from the front surface of the portion 20 b of thecircuit substrate, or again on account of the roughness and/or ofpossible deformation of the wall of the casing 16, for instance,following upon surface finish of the corresponding mould and/or thedifferent shrinkage of the polymeric and/or thermoplastic material inthe case of moulding of the casing 16.

The ideas set forth above are further clarified by the detailsrepresented in FIGS. 14 and 15. Clearly visible in the detail of FIG. 14is the top of a relief 16, which presses on the back of the portion 20 bof the substrate, thereby pushing the electrodes—one of which isdesignated by J—against the inner surface of the facing wall of thecasing 16. The further enlargement of FIG. 15 highlights the interfacearea between the electrode J and the aforesaid wall of the casing 16,from which it may be noted how, in the case exemplified, the facingsurfaces of the two elements in question have respective micro-cavities,for example due to surface roughness and/or deformations of materials(for example, different shrinkage of the material during moulding,slight warping, etc.). In the presence of the aforesaid gel—designatedby G in FIG. 15 at the interface between the aforesaidmicro-cavities—the reliefs 16 a urge the part 20 b of the substrate 20against the inner surface of the casing 16, thereby favouring exit ofthe excess gel between the two parts in question. In this way, betweenthese facing parts there remains only a film of gel G strictly necessaryto fill the aforesaid micro-cavities. The aforementioned exit of theexcess gel G is preferably allowed by the presence of at least oneoutlet chamber in the casing 16, for example comprising the part of thecavity H internal to the casing 16 that is not occupied by the substrate20 and by the reliefs 16 a. This chamber is designated schematically byH₂ in FIG. 13 (the chamber H₂ may possibly comprise the space previouslydesignated by H₁).

From FIG. 14 there may also be appreciated a deformation or slightremoval of material from the top of the relief 16 a, which in theexample assumes precisely a nominally rounded tip. As has beenexplained, the tapered shape of the reliefs 16 a is aimed at enabling adeformation, in particular in the case where the portion 20 b of thecircuit substrate is force fitted in the cavity of the casing 16 (forexample, in the case of excessive dimensional shrinkage or tolerancesdue to moulding of the casing itself), and at guaranteeing both theaforementioned thrust aimed at obtaining a good contact between theelectrodes J and the inner surface of the casing 16 and to cause outflowof the excess gel, for the purposes of a reliable and precise detection.In this regard, it should be considered that, in the preferredembodiment, the gel is introduced into the cavity of the casing 16 so asto substantially fill it, but for practical purposes it is sufficientfor the gel to be present in the interface area between the portion 20 bof the substrate with the electrodes J and the facing surface of thecasing 16, where the excess gel can, as has been said, flow out into theaforesaid outlet chamber H₂ inside the casing.

As already mentioned, the modalities of fixing of the body 10 a of thelevel sensor 10 to the tank may differ from the ones exemplifiedpreviously. In general, the coupling may be based upon the presence ofelements in relief associated to one of the body 10 a of the sensor 10and the tank 1, which are provided for coupling with cavities or seatspresent on the other of the tank and the body 10 a of the sensor,coupling preferably occurring following upon a movement that is in partaxial and in part angular. In one embodiment, the mechanical couplingbetween the body 10 a and the tank is a fast coupling, for example afast-block coupling or a threaded coupling or a quick-release coupling.FIG. 16 exemplifies the case of a coupling between the sensor 10 and thetank 1 based upon of a coupling system substantially of a bayonet type.In this example, the body 10 a of the sensor is provided, in itsattachment portion 14, with a plurality of surface engagement teeth orreliefs, just one of which is visible, designated by 12 d, which aredesigned for coupling in respective engagement seats 5 a defined inperipheral positions with respect to the opening 5 of the wall of thetank 1 provided with the opening 5, here the bottom wall 4. Preferably,the aforesaid wall of the tank 1 has, in a position corresponding to theopening 5, a cylindrical housing for receiving the attachment portion 14and the corresponding gasket 15, with the seats 5 a that extend betweenthe upper face of the wall 4 and the cylindrical surface of theaforesaid housing. For the purposes of coupling, the body 10 a isinserted through the opening 5, until the gasket 15 bears upon acorresponding contrast surface defined in the aforesaid cylindricalhousing, in which also the attachment portion is received. Thisinsertion is made in such a way that the reliefs 12 d start to enter asubstantially vertical stretch of the respective seats 5 a. A subsequentangular movement imparted on the body 10 a determines passage of thereliefs 12 d in the substantially horizontal stretch of the seats 5 a,with consequent engagement between the parts, as typically occurs inbayonet couplings of a known type (there being in any case possiblyenvisaged also inclined stretches in the seats 5 a).

In one embodiment, in addition or as an alternative, a coupling insidethe tank is provided, such as a coupling based upon engagement reliefsassociated to one of the distal end of the sensor 10 and the facing wallof the tank, these engagement reliefs coupling with cavities present onthe other of the aforesaid distal end and wall. For example, the distalend of the casing 16 may be provided with one or more engagement reliefsor teeth, preferably radial reliefs, designed for coupling in respectiveengagement seats defined in an element that rises from the wall of thetank facing the aforesaid distal end. The above coupling inside the tankmay envisage elements technically equivalent to those described withreference to the example of FIG. 16.

A coupling of the type illustrated in FIG. 16, in addition to notrequiring specific tools, makes it possible to obtain elastic mountingof the body 10 a of the sensor 10 on the tank 1. In the embodimentrepresented in FIG. 16, the shape of the housing 12 is substantiallycylindrical, without prejudice to the characteristics thereof describedpreviously.

In one embodiment, fixing between the body 10 a of the level sensor andthe tank 1 is of a permanent type, for example, obtained via gluing orwelding. A solution of this type is exemplified in FIG. 17, where risingon the outside of the wall 4 of the tank 1 (but it could be the wall 2)is an annular relief 2 a, here a substantially quadrangular relief,which circumscribes a region of the wall 4 in which the opening 5 isdefined, here consisting substantially of a slit having dimensions ofcross section slightly greater than those of the casing 16. In thiscase, the attachment portion 14 of the body 10 a has a shapesubstantially complementary to the closed profile defined by the relief2 a, i.e., quadrangular in the example illustrated, and is preferablyprovided with an annular relief of its own, complementary or specular tothe relief 2 a, not represented. For the purposes of coupling, thecasing 16 of the body 10 a is inserted into the opening 5, until theattachment portion 14 couples with the relief 2 a. Definitive fixingbetween the portion 14 and the relief 2 a may be obtained via anadhesive deposited on at least one of the two parts in question (wherethis adhesive also performs the function of ensuring fluid tightness) orelse by welding together the portion 14 and the relief 2 a, for examplevia laser or vibration or ultrasound welding, or again by remelting ofmaterial or the so-called hot-blade welding. Of course, in this case,the materials constituting the wall 2 or 4 of the tank 1 and theattachment portion 14 of the body of the sensor are materials that arecompatible in view of the fact that they are to be welded together.

In the embodiment represented in FIG. 17, the wall of the housing 12from which the connector body 12 a projects and the connector bodyitself have a structure different from the cases illustrated previously,without prejudice to the characteristics of the device described withreference to FIGS. 1-15. In FIGS. 16 and 17, also the connection betweenthe terminals internal to the connector body 12 a and the internalcircuit of the sensor 10 is different from the one previouslyexemplified. According to these variants, electrical connectors arepreferably provided, equipped with a connector body 12 a shaped so as todefine keying means, designed to enable unique coupling with arespective external electrical connector, and/or constraining means,designed to enable coupling with the aforesaid external connector onlyin the right direction, thereby preventing reversals of polarity orerroneous connections.

FIG. 18 illustrates a variant embodiment similar to that of FIG. 16, butdistinguished by the presence of two elastic elements 15′ and 15″, hererepresented by O-rings, with the attachment portion 14 that definescorresponding seats for these elements. Preferably, the surfaceengagement reliefs 12 c are defined in the portion 14 in an intermediateposition between the two elastic elements 15′ and 15″, i.e., in anintermediate position between the corresponding positioning seats. Asvisible in FIG. 19, in such an embodiment, the cylindrical housing atthe installation opening 5 is shaped so as to present two axial restingsurfaces 5 b and 5 c for the elements 15′ and 15″, respectively, withthe engagement seats 5 a for the reliefs 12 d that are in anintermediate position between the aforesaid surfaces.

In such an embodiment, the lower gasket 15″ performs functions of seal,in particular of radial seal, between the portion 14 of the body 10 aand the inside of the corresponding cylindrical housing. The elasticelement 15′ is, instead, designed to be axially compressed between thecorresponding resting surface of the portion 14, designated by 14 a inFIG. 16, and the surface 5 b of the cylindrical housing. In this way, inthe installed condition, the elastic reaction of the element 15′ urgesthe body 10 a as a whole towards the outside of the housing (downwards,with reference to FIG. 18), thus guaranteeing an elastic mounting andrecovery of possible tolerances between the parts involved.

As has been said, the configurations of installation described withreference to FIGS. 16-19 can be used also when the level sensor 10 isassociated to the upper wall of the tank, in a way similar to what isillustrated in FIG. 1.

As has been seen, in the embodiments described so far, the level sensor10 includes an array of capacitive elements J₁-J_(n) (“n” being equal to37, in the examples so far illustrated). In practice, each electrode Jprovides, together with the corresponding control electronics and withat least another electrode J, a sort of capacitive proximity sensor,which is able to detect the presence or absence of the medium evenwithout direct contact with the latter. Such a type of operation isbased upon the principle of detection of the capacitance of a capacitor.The two electrodes J constitute the sensitive sides of the capacitor,representing the plates thereof, and the medium that separates them(here the material of the portion 20 b and/or the gel G and/or the air)represents the dielectric, giving rise to a substantially predefinedcapacitance. The presence or absence of a further medium in theproximity of one of the two electrodes J determines a substantiallypredefined variation or perturbation of the aforesaid capacitance thatthe control electronics is able to detect.

In the application considered herein each electrode J is hence able toprovide at least two different capacitive structures according towhether the liquid is present or absent in front of it, namely, atleast:

-   -   a first capacitive structure having a first value of        capacitance, when an electrode J is facing the liquid, i.e.,        when the level of the liquid in the tank corresponds to, or is        above, the electrode J considered; and    -   a second capacitive structure having a second value of        capacitance, when an electrode J is not facing the liquid, i.e.,        when the level of the liquid in the tank is below the electrode        J considered.

In the preferred embodiment illustrated, as has been seen, theelectrodes J are isolated with respect to the liquid, in so far as theyare contained in the electrically insulating and fluid-tight casing 16:the wall of the casing 16 that the electrodes J face, with theelectrically insulating substrate 20 and/or the air and/or the possiblelayer of gel G set in between, can thus be considered as a sort ofdielectric.

The thickness of the wall of the casing 16 facing the electrodes J,i.e., of the insulation layer, may be indicatively comprised between 0.1and 5 mm, preferably between 0.6 and 1 mm, very preferably approximately0.8 mm. As already mentioned, moreover, the hollow casing 16 may bereplaced by a direct overmoulding of plastic material on the sensitiveelement or by a generic wall or insulation layer of the electrodes J,with a thickness of the part facing the electrodes J similar to the oneindicated for the homologous wall of the casing 16.

Each electrode J is electrically connected—by itself or else in common,in particular in parallel, with at least another electrode J, asexplained hereinafter—to a respective input of a plurality of inputs ofthe controller 24 that belongs to the circuit arrangement 23.Preferably, provided between each input of the controller and acorresponding electrode J is a filter resistance (two of theseresistances are designated by R₁ and R_(n) in FIGS. 6 and 7). Thecontroller 24 is substantially pre-arranged for discriminating the valueof capacitance associated to each electrode J at least between theaforesaid first and second values of capacitance and consequentlyidentifying at least one liquid/air transition in the tank, which isindicative of the level of the medium when this is in the fluid state.In a preferred embodiment, the controller 24 carries out a sequentialsampling of the values of capacitance present at the inputs to which theelectrodes J are connected in order to identify the aforesaidtransition.

The controller 24 is preferably a digital electronic microcontrollerprovided with an analog-to-digital converter. Merely way of example, acommercial microcontroller suitable for the application proposed hereinis the one identified by the code PIC16F1517 marketed by MicrochipTechnology Inc., Chandler, Ariz., U.S.A. It should in any case be notedthat the functions of the controller 24 may be at least in partimplemented via dedicated external circuits. For example, in a preferredembodiment, the controller 24 is constituted by a microcontroller thatimplements an analog-to-digital converter module, but in otherembodiments the controller 24 may include a microcontroller (or amicroprocessor or an ASIC or an FPGA) and an integrated (or external orindependent) circuit dedicated for performing analog-to-digitalconverter functions.

FIG. 20 shows schematically a controller 24 that, merely by way ofexample, includes “n” signal inputs IN (herein twenty in number),connected to which, via corresponding conductive paths 25, are as manyelectrodes J in single configuration (i.e., not connected in common orin parallel to other electrodes). FIG. 20 is aimed at clarifying thegeneral operating principle of a sensor according to the invention.

In a preferred embodiment, detection of the value of capacitance at eachof the inputs IN is made in an indirect way, for example on the basis ofthe measurement of a voltage or else by converting an input capacitanceinto an equivalent resistance and then converting the current measuredvia the equivalent resistance into a digital count. In these cases,preferably, the inputs IN of the controller 24 are analog inputs, andthe controller implements or has associated an analog-to-digitalconverter.

In one embodiment, associated to each input IN is a sampling ormeasuring circuit including a controllable switch and a capacitor, whichare here also referred to as “sampling switch” and “holding capacitor”.The controllable switch is switchable between a first position, in whichthe holding capacitor is connected to a voltage source, and a secondposition, in which the capacitor itself is connected to a respectiveelectrode J or to a number of electrodes J connected in common (inparallel). Preferably, the above voltage is a d.c. voltage, for examplethe supply voltage of the circuit arrangement 23. The controller 24comprises or has associated means for connecting to ground one or moreof the inputs IN (i.e., the corresponding electrodes J) different fromthe one each time considered for the purposes of measurement, as well asmeans for bringing about switching of the controllable switch from thefirst position to the second position so as to discharge the holdingcapacitor in a way proportional to the value of capacitance associatedto the corresponding electrode J or set of electrodes J connected incommon. In one embodiment, there may be envisaged the connection toground of all the inputs IN (or electrodes J) different from the oneeach time considered for the purposes of measurement. In a possiblevariant embodiment, instead of a connection to ground, the input orinputs IN (i.e., the corresponding electrodes J) different from the oneconsidered for the purposes of measurement can be connected to adifferent predefined potential, i.e., a different reference voltage,preferably a potential or voltage different from the voltage on theinput IN or electrode J each time considered for the purposes ofmeasurement of capacitance (for example, an intermediate voltage betweenthe positive supply voltage and ground or else a negative potential orvoltage).

In addition, the controller 24 has means for determining the voltage atthe input IN when the controllable switch is in its second position,this voltage being indicative of the capacitance associated to theelectrode J or the set of electrodes J. The controller 24 then hascontrol or comparator means, for comparing the voltage determinedpresent at the input IN with at least one corresponding reference valueor threshold, and thereby deducing whether the liquid is facing or isnot facing the electrode J or else at least one of the electrodes of theset of electrodes J connected in common.

In one embodiment, scanning or sampling of the inputs IN is obtainedusing a sample-and-hold circuit associated to an analog-to-digitalconverter, and the measurement of capacitance of each electrode J or setof electrodes J is carried out as comparison of the measurement madewith the intrinsic capacitance of the circuit.

An example of operation of a sensor according to the configuration ofFIG. 20—i.e., with electrodes connected singly to respective inputs ofthe controller 24—is illustrated schematically in FIG. 21. It should benoted that this figure represents, merely for reasons of greaterclarity, a level sensor mounted from above, i.e., in the configurationof FIG. 1. The corresponding electrodes J, however, are illustrated inthe same order as that of FIG. 20 (hence with the electrode J₁ furthestdown and the electrode J_(n) furthest up).

Visible in FIG. 21 is the tank 1, having inside it the sensing part 11of the sensor, i.e., the electrodes J₁-J_(n), contained in thecorresponding casing 16, which is at least partially immersed in theliquid AdBlue, designated by L (the substrate 20 is not here representedfor reasons of clarity, and considering that—in a possible embodiment—itcould be the casing 16 itself that performs the functions of thesubstrate 20). In the example illustrated, the analog inputs IN of thecontroller 24 are connected to a multiplexer MTP implemented in thecontroller itself, which substantially operates as an electronicdeviator, associated to which is a sample-and-hold circuit, herecomprising a holding capacitor C_(HOLD) and a sampling switch SS. Thesampling switch SS can be switched between a first position, ofconnection to the voltage V_(DD) (for example, the supply voltage of thecontroller 24), and a second position, of connection to an output of themultiplexer MTP, i.e., a position of connection to the electrodes J.

As has been said, the control circuit arrangement 23 or its controller24 comprises means for connecting to ground one or more inputs IN, i.e.,the corresponding electrodes J, different from the one each timeconnected to the sample-and-hold circuit. In the example of FIG. 21, forexample, the multiplexer MTP is obtained so as to switch each time eachinput IN to the sample-and-hold circuit and one or more of the otherinputs IN (possibly all of them) to ground, as represented schematicallyby the ground symbol GM in FIG. 21. As has been mentioned, instead of aconnection to ground, there may be provided a connection to a differentpredefined potential (in this perspective, the symbol GM may beunderstood also as representing a connection to the aforesaid predefinedpotential).

Via the multiplexer MTP the inputs IN, and hence the electrodes J, areconnected sequentially to the sampling switch SS. As has been said, wheneach of the inputs IN is connected by the multiplexer MTP to the switchSS, the multiplexer also connects to ground or to a different predefinedpotential one or more of the other inputs IN, preferably at least theinputs IN corresponding to the electrodes J set adjacent to or in theproximity of the electrode J each time connected to the sample-and-holdcircuit.

The sampling switch SS is switched cyclically, in a way synchronizedwith operation of the multiplexer MTP, between the first position, ofcharging of the capacitor C_(HOLD), and the second position, ofconnection of the capacitor itself to the input IN currently selected bythe multiplexer MTP, and hence to the corresponding electrode J. Withthe switch SS in its second position there is basically brought about acharge balance between the capacitance of the capacitor C_(HOLD) and thecapacitance associated to the electrode J considered, which here isassumed as being the electrode J₁. In other words, with this chargebalance, the capacitor C_(HOLD) is discharged in a way proportional tothe capacitance of the capacitor defined by the electrode J₁ and by theelectrode J₂ that is adjacent to J₁ and is connected to ground or to theaforesaid different predefined potential (it should be considered thatalso other adjacent electrodes J could contribute for the purposes ofthe aforesaid detection or discharge, such as the electrode J₃represented if it is connected to ground or to a different predefinedpotential, but this contribution is negligible and is hence notconsidered herein, for the purposes of a simpler and clearer explanationof operation of the system). Via the analog-to-digital converter (ADC)the amount of charge, i.e., a residual voltage of the capacitorC_(HOLD), is thus determined, which is then compared with a predefinedreference value or threshold in order to deduce whether the electrode J₁considered is facing the liquid L or not, i.e., whether the electrode J₁has assumed the first capacitive structure or configuration or thesecond capacitive structure or configuration indicated previously.

As has been explained previously, when at least one pair of electrodes Jis facing the liquid L, i.e., when the detection electrode J and atleast one electrode J at ground or at a different potential are facingthe liquid (for example, the electrodes J₁ and J₂ of FIG. 21),associated thereto is a first value of capacitance, whereas in theopposite case (as for the electrodes J_(n) and J_(n-1) of FIG. 21)associated thereto is a second value of capacitance, different from thefirst value.

Following upon the aforesaid balancing between the charges of thecapacitor C_(HOLD) and of the electrode J₁, the voltage value across ofthe capacitor and/or at the input IN₁ may substantially coincide or elsebe higher or lower than a determined reference threshold, previouslystored in the controller 24. For example, in one embodiment, thecontroller 24 may be programmed in such a way that detection at an inputIN of a voltage equal to the predefined threshold or higher than this isindicative of the fact that the electrode considered is not facing theliquid L (as for the electrode J_(n)), whereas detection at the input INof a voltage below the threshold is indicative of the fact that theelectrode is facing the liquid (as for the electrode J₁).

As may be appreciated, by carrying out the sequential samplingdescribed, the controller 24 is able to identify the two electrodes Jcorresponding to the liquid/air transition in the tank 1. Once thepresence of the liquid/air transition has been detected, the controllercan deduce the level of liquid on the basis of the fact that theelectrode between the two electrodes J associated to which is thevoltage value equal to or above the threshold is the first electrodefacing the air (or conversely, the electrode associated to which is thevoltage value below the threshold is the last electrode facing thefluid).

For the above purpose, preferably contained in the circuit 24 isinformation representing values in length (height) corresponding to theposition of each electrode J, or in any case the distance between theelectrodes J in the direction of the measurement axis X, so as to beable to establish or calculate the level according to the predefinedmeasuring unit. The electronics of the sensor 10 transmits or generatessignals to be sent to the outside world and/or to the electricalconnector of the sensor 10, which represent the level information.

As has been explained previously, for the purposes of detection themultiplexer MPT cyclically connects one input IN to the sample-and-holdcircuit and at least some of the other inputs IN (preferably all) toground or to a certain potential. This proves useful also for reasons ofshielding of electromagnetic disturbance and for improving thesignal-to-noise ratio. This connection to ground or to a givenpotential, in particular of all or multiple inputs IN or electrodes J,may generate parasitic capacitances in the system, which may, however,be considered negligible with respect to the measurement of capacitanceof effective interest, as described previously.

It will be appreciated that the operations described with reference toFIG. 21 may be obtained also with circuits different from, buttechnically equivalent to, the one exemplified. For example, to eachinput IN of the controller 24 there could be associated a respectivecircuit that performs the functions of the sample-and-hold circuitdescribed above, with a multiplexer MTP between the aforesaid circuitsand the ADC. Another possibility is to provide each input IN with asampling or measuring circuit, which performs, for example, thefunctions of the sample-and-hold circuit described above, interfaceddirectly with an ADC. Such a case is, for example, representedschematically in FIG. 22, where the controllable switches designated byMS are switched selectively for connecting each time each input IN tothe corresponding sample-and-hold circuit (as for the input IN₁) and theother inputs IN to ground or to the aforesaid reference voltage (as forthe input IN_(n)). It should be noted that, in the example of FIG. 22,each input IN is connected to a set of electrodes connected together incommon (IN₁ to J₁, J₃, J_(n-1) and IN_(n) to J₂, J₄, J_(n)), inparticular in parallel, instead of to a single electrode as in FIG. 21.

Preferably, the electronics of the sensor forming the subject of theinvention is appropriately initialized and/or calibrated in theproduction stage, with storage of the corresponding software or programand/or of at least some of the variables (such as one or more thresholdsused in the level detections), which, for example, depend upon thephysical configuration of the sensor and of the system on which it isinstalled, here represented by the tank 1.

In one embodiment, the calibration step includes a reading of all thevalues of the electrodes J in “dry” conditions or in air (i.e., notfacing the liquid) in order to define first reference thresholds and/ordefine an initial offset zero-setting, namely, to compensate for theparasitic capacitances due to materials, structures, thicknesses, etc.of the sensor and/or of the system on which it is installed. This valueis stored as threshold reference for the detections as a maximum voltagethreshold that can be detected across the capacitor C_(HOLD) and/or bythe ADC circuit, it being possible to vary subsequently this thresholdvalue following upon measurements made in the course of the service lifeof the sensor, for example by means of a dedicated reference electrode.This calibration threshold is preferably carried out only once on theproduction line, but, for some applications where the tank presentscritical geometries that might affect measurement of the raw data of theelectrodes J (such as very restricted volumes and presence of metalmaterial), it is possible to use this calibration or self-calibrationdirectly on the sensor 10 installed so as to have an optimal calibrationin the real system and/or eliminate all the possible effects of noisedue to the external environment.

The operating principle described to a certain extent depends upon thetemperature and ageing of the system, if observed in an absolute way.For this reason, in a preferred embodiment, the controller 24 isprogrammed for carrying out a measurement of a differential type,preferably using for this purpose at least one reference electrode.Given that the effect of the temperature is represented by an offset onthe measurement of the voltage value determined at an input IN of thecontroller 24, by carrying out a differential measurement between adetection electrode and a reference electrode it is possible both toderive the measurement on the detection electrode and to subtract thecommon-mode effect present on the detection electrodes, and hence tocancel out any possible thermal and/or structural drift produced by thechange in temperature and/or by ageing. The aforesaid thermal drift maybe compensated also via a temperature sensor, for example of the sametype as the ones designated by 26 and 27. Hence, according to thisembodiment, the voltage value determined, used for the comparison withthe at least one reference threshold, is preferably a differentialvalue.

The aforesaid reference electrode is preferably the electrode furthestdown inside the tank 1, and hence, with reference to the examplesillustrated so far, the electrode J₁. It is also possible to provideeven a number of reference electrodes (for example, the first threeelectrodes J starting from the bottom), which can be used for carryingout the differential measurement, as well as to program the controller24 in order to select each time any one of the electrodes J₁-J_(n) asreference electrode for carrying out the differential measurement (thecontroller 24 is in fact able to identify an electrode that is facing oris not facing the liquid, on account of the fact that the capacitance inthe two conditions is different and on account of the presence of theaforementioned maximum threshold).

In an embodiment of this type, the controller 24 scans all theelectrodes J and acquires corresponding raw voltage data for thepurposes of verification of the presence of the liquid. In this step,the controller 24 calculates the difference between the raw data of eachdetection electrode and the raw data of the reference electrode J₁, thusobtaining a relative measurement. This difference is compared with atleast one minimum threshold defined in the design stage. In a possibleembodiment, if at least one of the differences calculated between eachdetection electrode J₂-J_(n) and the reference electrode J₁ is below theminimum threshold, this means that the detection electrode in questionis at least partially facing the liquid L; otherwise, the electrode inquestion is in air, i.e., is at a height higher than the level of theliquid L.

In one embodiment, in order to detect a reference value for themeasurement and/or a minimum level, a further electrode (not shown) maybe provided, adjacent to J₁, or else the electrode J₁ is designed tooperate as ground or reference electrode, in which case detection of thereference value and/or of the level will start from the adjacentelectrode J₂.

As already mentioned, search for the level is substantially based uponidentification, by the controller 24, of the two detection electrodescorresponding to the transition between liquid and air (for example,with reference to FIG. 22, the electrodes J₄ and J_(n-1)). Theevaluation is made by comparing the relative information (i.e., thedifferential measurement) with thresholds predefined for each electrodeand defined in the design stage (which may be replaced with thresholdsdefined and stored following upon testing with liquid in the productionstage) in order to deduce whether an electrode is facing the liquid ornot. Following upon the scan made, the controller can thus identify twoadjacent detection electrodes, one of which is facing the liquid and theother is not, i.e., the position in height of the liquid/air transitionin the tank 1.

In an embodiment in itself inventive, the electronic circuit of thesensor 10 undergoes a calibration or configuration on the basis of thetype and/or conductivity of the medium of which the level is to bedetected, in particular considering that, in the case of slightlyconductive, i.e., resistive, media there would be determined also a sortof electrical resistance virtually connected in series to themeasurement capacitor, the resistance of which could cause a lengtheningof the time necessary for reaching the final threshold value (such as anincrease in the charging time of the “virtual capacitor” to which anelectrode J belongs and/or an increase in the discharging time of thecapacitor C_(HOLD)). In this perspective, the aforesaid calibration may,for example, be envisaged in order to take into account possible delaysin the sampling measurement, and prevent erroneous measurements onvalues that have not yet settled completely.

In an embodiment in itself inventive, the electronic circuit of thesensor 10 is configured for detecting the charging curve of thecapacitor corresponding to the detection electrode J and/or fordetecting the discharging curve of a holding capacitor, such as thecapacitor C_(HOLD), where the charging curve and/or discharging curveare/is variable at least in proportion to the characteristics ofelectrical conductivity and/or impedance of the medium undergoingmeasurement, so as to be able to determine characteristics of the mediumitself. The electronic circuit may use the information thus acquired forcarrying out one or more from among operations of detection, processing,comparison, storage, compensation, and warning. For this purposestructural and/or circuit elements may be used, which are at least inpart similar to the ones described previously.

As has been mentioned (see the schematic example of FIG. 22), in aparticularly advantageous embodiment, the detection electrodes compriseat least first detection electrodes, which are connected to respectiveinputs IN of the controller 24, and second detection electrodes, whichare electrically connected in common or in parallel to the firstdetection electrodes.

Another example of this sort is illustrated schematically in FIG. 23,where the aforesaid first electrodes go from the electrode J₄ to theelectrode J₂₀, while the second electrodes go from the electrode J₂₁ tothe electrode J_(n). In this example, the electrodes J₁-J₃ may bereference electrodes. In the configuration of FIG. 23, it issubstantially possible to identify a first sub-array (or module or blockor set) of first electrodes, which go from the electrode J₄ to theelectrode J₂₀, and a second sub-array of second electrodes, which gofrom the electrode J₂₁ to the electrode J_(n), which are substantiallyconnected together in common or in parallel. The number of sub-arrays ofelectrodes may be increased in order to obtain longer or shorter levelsensors, i.e., in order to enable different level measurements.

In an embodiment of this type, the aforesaid control or comparatorsmeans implemented in the controller 24 are pre-arranged for comparingthe voltage determined at the input IN corresponding to two electrodesconnected in common (for example, the electrodes J₄ and J₂₁ in parallel)with at least two corresponding reference thresholds in order to deducewhether the liquid is facing or is not facing the first detectionelectrode (the electrode J₄) and/or to the corresponding seconddetection electrode (the electrode J₂₁). The measurement may be madeaccording to the modalities described previously. Preferably, also inthis case, the measurement is made by acquiring the raw datum at theinput IN to which the two detection electrodes connected in common areconnected, and then referencing this value with respect to a referenceelectrode, such as the electrode J₁, in order to pass from an absolutemeasurement to a differential measurement so as to eliminate thepossible common-mode error effect due to the temperature and/or toageing of the level sensor, as described previously.

In one embodiment, the value obtained from the differential measurementis compared with a number of thresholds equal to the number ofelectrodes connected in common increased by 1. Consequently, withreference to the example considered here of two electrodes J inparallel, the differential value is compared with three distinctthresholds defined in the design or production stages: a value equal toa first threshold or within a given neighbourhood thereof (for example+/−40%) indicates that both of the electrodes are not facing the liquid,a value equal to a second threshold or within a given neighbourhoodthereof (for example +/−40%) indicates that one of the electrodes (knownon the basis of its physical position) is facing the liquid and theother electrode is not, and finally a value equal to a third thresholdor within a given neighbourhood thereof (for example +/−40%) indicatesthat both of the electrodes are facing the fluid.

In a different embodiment, a more simplified logic of analysis isprovided, whereby the value obtained from the differential measurementis compared with a number of thresholds equal to the number ofelectrodes connected in common. Consequently, with reference once againto the example considered here of two electrodes J in parallel, thedifferential value is compared with just two thresholds: a value above afirst threshold indicates that both of the electrodes are not facing theliquid, a value between the two thresholds indicates that one of theelectrodes (known on the basis of its physical position) is facing theliquid and the other electrode is not, and finally a value below thesecond threshold indicates that both of the electrodes are facing thefluid.

Of course, on the basis of the same principle described above, there maybe envisaged more than two electrodes connected in common, i.e., anumber of sub-arrays with the respective electrodes in parallel, inwhich case the number of reference thresholds for each input IN will beequal to the number of electrodes of each parallel increased by 1 orelse equal to the number of electrodes of each parallel, according tothe analysis approach implemented.

For example, FIG. 24 illustrates the case of first, second, and thirddetection electrodes connected in common or in parallel (in a waysimilar to the schematic case of FIG. 22). The first electrodes go fromthe electrode J₄ to the electrode J₂₀, the second electrodes go from theelectrode J₂₁ to the electrode J₃₇, and the third electrodes go from theelectrode J₃₈ to the electrode J_(n). In this example, the electrodesJ₁-J₃ may be reference electrodes. In the example of FIG. 24, it ishence possible to identify three sub-arrays of electrodes, with theelectrodes of one sub-array (J₄-J₂₀) that are substantially connected incommon or in parallel with similar electrodes of the other sub-arrays(J₂₁-J₃₇ and J₃₈-J_(n)).

In an embodiment of this type, the control means or comparatorsimplemented in the controller 24 are pre-arranged for comparing thevoltage determined at the input IN corresponding to three electrodes inparallel (for example, the electrodes J₄, J₂₁ and J₃₇) with threecorresponding reference thresholds in order to deduce whether the liquidis facing or is not facing the first detection electrode (the electrodeJ₄) and/or the corresponding second detection electrode (the electrodeJ₂₁) and/or the third detection electrode (the electrode J₃₇). Anexample of operation of an arrangement of the type illustrated in FIG.24 is described hereinafter with reference to FIGS. 25 and 26.

FIG. 25 is a schematic representation similar to that of FIG. 22,highlighted in which are just two inputs IN₄ and IN_(n) of thecontroller 24 (the representation of the reference electrode J₁ is hereomitted for reasons of clarity). As for the case of FIG. 22, thecontroller 24 carries out sequential sampling of its analog inputs IN,with corresponding differential measurement for each of them andcorresponding comparison with the three thresholds predefined forelectrodes J facing the liquid L and/or with the thresholds predefinedfor “dry” electrodes J, i.e., ones not facing the liquid L. Also in thiscase, the control circuit arrangement comprises means for connecting toground or to a different predefined potential one or more inputs INdifferent from the one each time connected to the sample-and-holdcircuit.

FIG. 26 exemplifies in graphic and schematic form the measurementprinciple adopted for the various inputs IN, for example the input IN₄.Assume that the initial voltage of 5 V indicated in the graphcorresponds to the voltage V_(DD) of FIG. 25. TH1, TH2, and TH3 arethree predefined threshold values for the input IN₄, i.e., a maximumthreshold, a minimum threshold, and an intermediate threshold,respectively, for the condition of electrodes facing the liquid.

The graph in part a) of FIG. 26 expresses the condition that arises inthe case where none of the three electrodes J₄, J₂₁, and J₃₈ is facingthe fluid, following upon switching of the switch SS of FIG. 25 into itsposition in which the capacitor C_(HOLD) is connected to thecorresponding set of detection electrodes J₄, J₂₁, and J₃₈. In thefigure, the falling edge of the voltage represents the decrease involtage value due to the differential measurement made with themodalities described previously and/or to the fact that, even if theyare not facing the liquid L, associated to the three electrodes inquestion is, in any case, an albeit minimal capacitance, due to thestructure of the device. The drop in voltage appearing in the graph ofpart a) of FIG. 26 may be noted also as regards a given “dry” thresholdvalue, designated by THD, higher than the minimum threshold value TH3,it being possible to use this threshold value THD also for the purposesof discrimination with respect to the three detection thresholds TH1,TH2, and TH3. The drop in voltage in the graph a) remains within thegiven neighbourhood (for example, the aforesaid +/−40%) of the thresholdTHD, and in any case above the maximum threshold TH3. The controller 24hence deduces absence of the liquid in front of the electrodes J₄, J₂₁,and J₃₈.

The graph of part b) of FIG. 26 expresses, instead, the condition thatarises in the case where one of the electrodes J₄, J₂₁, and J₃₈ isfacing the liquid L. In this case, the reduction in value of the voltageis greater than in the previous case. In addition to the differentialmeasurement, in fact, the overall capacitance associated to the threeelectrodes is higher than in the previous case, given that one of themis facing the liquid L. The voltage value falls now within the givenneighbourhood of the threshold TH3, and from this the controller 24deduces the presence of liquid in front of just one of the electrodes,i.e., the downmost electrode of the three (the physical position of theelectrodes being known to the controller).

The graph of part c) of FIG. 26 expresses, instead, the conditioncorresponding to that of FIG. 25, i.e., the condition in which two ofthe electrodes J₄, J₂₁, and J₃₈ are facing the liquid L. The decrease involtage is now greater than in the case of part b) of FIG. 23 since, inaddition to the differential measurement, in the condition in question,the overall capacitance associated to the three electrodes is furtherincreased with respect to the previous case. The voltage value is now inthe given neighbourhood of the threshold TH2. The controller 24 hencededuces the presence of liquid in front of the electrodes J₂₀ and J₃₇and the absence of liquid in front of the remaining electrode J, i.e.,the uppermost electrode of the three. This discrimination is madeconsidering also that, in the case of conditions of icing or partialsolidification of the liquid, it is possible to combine other detectionsin order to discriminate better this condition, such as a verificationand comparison with the state of adjacent electrodes and/or a detectionof temperature. Finally, the graph of part d) of FIG. 26 expresses thecondition in which all three electrodes J₄, J₂₁, and J₃₈ are facing theliquid L. The decrease in voltage is evidently greater than in the caseof part c) of FIG. 23 since, in addition to the differentialmeasurement, in the condition in question, the overall capacitanceassociated to the three electrodes is maximum. The voltage value is nowin the given neighbourhood of the threshold TH1, and hence thecontroller 24 deduces the presence of liquid in front of the threeelectrodes J₂₁ and J₃₈.

As clarified previously, the same findings may be obtained using asimplified logic, i.e., comparing the voltage value with just the threedetection thresholds TH1, TH2, and TH3, as follows:

-   -   part a) of FIG. 26: with the voltage value that remains above        the threshold TH3, the controller 24 deduces the absence of        liquid in front of the electrodes J₄, J₂₁, and J₃₈;    -   part b) of FIG. 26: with the voltage value that is comprised        between the threshold TH3 and the threshold TH2, the controller        24 deduces the presence of liquid in front of the downmost        electrode of the three;    -   part c) of FIG. 26: with the voltage value that is comprised        between the threshold TH2 and the threshold TH1, the controller        24 deduces the presence of liquid in front of the electrodes J₂₀        and J₃₇ and the absence of liquid in front of the remaining        electrode J_(n); and    -   part d) of FIG. 26: with the voltage value that drops below the        threshold TH1, the controller 24 deduces the presence of liquid        in front of the three electrodes J₂₁ and J₃₈.

By scanning the inputs IN with any of the modalities exemplified above,the controller 24 is able to identify the liquid/air transition. In thespecific case of FIG. 25, then, the controller 24 can deduce thepresence of a liquid/air transition between the electrodes J₃₇ and J₃₈,thereby identifying the level of the liquid in the tank 1.

From what has been described above, it may be readily understood how thetype of embodiment proposed is extremely flexible in relation to thepossible lengths required for the level sensor. In other words, with agiven controller 24 and substantially given the same number of itsanalog inputs IN (or with a slightly greater number of inputs IN, asdescribed hereinafter) it is possible to provide level sensors ofdifferent lengths, envisaging for detection the use of electrodes J insingle configuration, or else two electrodes J in parallel, or elseagain three electrodes J in parallel, and so forth.

For example, by positioning twenty electrodes J in single configuration,which are 2 mm in height and are set at a distance of 2 mm apart, it ispossible to cover a sensitive area for the measurement of level of 78 mm((20 electrodes+19 spaces between them)×2 mm). When it is necessary toincrease the length of the sensitive area (measurement of higher levels)maintaining the same measurement resolution, it is possible to use twoelectrodes in parallel, or else three, even maintaining the samecontroller 24.

Preferably, in the presence of first detection electrodes connected incommon to further detection electrodes, it is preferable for thephysical position of the various sub-arrays of electrodes to be as faraway as possible from one another in order to increase the difference ofsignal and hence the quality of the level information. For this reason,in a preferred embodiment, if a number of sets of detection electrodesconnected in common are provided, the electrodes of each set formrespective sub-arrays arranged in sequence along the detection axis ofthe sensor, as may be appreciated, for example, from FIGS. 23 and 24. Ingeneral, and with reference for example to FIG. 24, the rule may beapplied whereby, given a number y (for example 17) of first electrodes(J₄-J₂₀) in parallel to second electrodes (J₂₁-J₃₇), set between eachfirst electrode and the corresponding second electrode there will be y−1(in the example, 16) electrodes.

Thanks to the type of embodiment described, it is also possible to havedifferent sensitivities of detection of the level. This may be obtained,in the step of production of the part 20 a of the substrate with thecorresponding electrodes J by positioning the electrodes themselves witha centre-to-centre distance equal to the desired resolution. It is alsopossible to envisage at least two differentiated resolutions ofmeasurement on the sensitive portion 20 b of the sensor, in particularat least one measurement with higher resolution and one measurement withlower resolution, in a lower area and in an upper area of the portion 20b, or vice versa. In such a case, the electrodes in the lower area ofthe portion 20 b may be closer to one another than the electrodespresent in the upper area, or vice versa. The minimum distance betweentwo electrodes may, for example, be 1 mm. It is then evident that thedimensions of the electrodes define the level of capacitance that can bemeasured by the control electronics so that an electrode of higher levelwill offer a higher dynamics or measurement value.

The electrodes J are preferably (but not necessarily) equal to eachother and may for example be obtained with dimensions of 20 mm(length)×2 mm (height) and set at a distance of 2 mm apart. For levelsensors having a length shorter than 100 mm—or in the case where it isintended to increase the resolution in an area of the sensitive portionof the sensor—it is possible to reduce the dimensions of the electrodesand hence decrease also the distance between them, precisely to obtain ameasurement with higher resolution. In these cases, the electrodes may,for example, have dimensions of 15 mm (length)×1 mm (height) and be setat a distance of 1 mm apart. To maximize the dynamics of measurement forthe liquid, for example for the liquid AdB lue here considered (or othersolution with urea or different reducing agent), it is moreoverpreferable to size the electrodes, for any value of their length, insuch a way that the height of an electrode is equal to the distancebetween two contiguous electrodes. Preferably, the spacing between twocontiguous electrodes J will be greater than twice the thickness of thewall that separates them from the medium 12.

FIGS. 27 and 28 illustrate, with views similar to that of FIG. 24,further possible arrangements that envisage three sets of electrodes Jin parallel. In the case of FIG. 27 the two end electrodes of the arrayillustrated, namely, the electrodes J₁ and J_(n), are not connected inparallel to other electrodes and constitute reference electrodes for thecondition of presence and of absence of liquid, respectively, or viceversa, the function of which is preferably programmable orpre-determinable, for example in order to enable installation of thesensor 10 in the tank 1 in the two conditions of FIGS. 1 and 2.

FIG. 27 illustrates a configuration, in part similar to that of FIG. 24,where the array of electrodes include three sub-arrays of first, second,and third detection electrodes connected in common with (i.e., inparallel to) one another, the sub-arrays being separated, however, byindividual electrodes. The first electrodes go from the electrode J₂ tothe electrode J₁₇, the second electrodes go from the electrode J₁₉ tothe electrode J₃₄, and the third electrodes go from the electrode J3 ₆to the electrode J₅₁. In this example, the intermediate electrodes J₁₈and J₃₅ are, instead, independent and set between the aforesaid threesub-arrays of electrodes. In particular, the single electrode J₁₈ is setbetween the first sub-array (J₂-J₁₇) and the second sub-array (J₁₉-J₃₄),whereas the single electrode J₃₅ is set between the aforesaid secondsub-array and the third sub-array (J₃₆-J₅₁).

The intermediate electrodes J₁₈ and J₃₅ enable a clearer distinctionbetween the sub-arrays of electrodes connected in common, in particularin order to detect particular conditions or states of the liquid orother medium undergoing measurement (such as a state of partialsolidification or icing of the liquid or medium), in particular a moreprecise and/or clearer distinction in detection of transitions“liquid—air/gas” and/or “liquid—air/gas—solid/ice”. For this purpose, itshould be considered that the electrodes set between J₁₈ and J₃₅ enablefaster determination of which and/or how many sub-arrays or partsthereof are facing (or not) the medium, it thus being possible toidentify more rapidly the areas of uncertainty in which to carry outmore accurate measurements, i.e., by detecting the areas of transitionbetween two adjacent electrodes in order to detect, for example, thearea of liquid-air transition, as mentioned previously.

The presence of the intermediate independent electrodes is moreoveruseful in order to discriminate better the values in relation to theaforesaid reference thresholds (such as TH1, TH2, TH3 and/or the “dry”threshold), in particular in the case of a large number of sub-arrays ofelectrodes in common (or in parallel): in the case of many sub-arrays,there will in fact be present many reference thresholds set closer toone another; for example, in the case where it is preferable, forreasons of costs, to use an ADC with lower resolution (for example, 8bits instead of 10 or 12 bits), the presence of the aforesaidindependent electrode J₁₈, J₃₅ enables a detection that is clearerand/or more certain, in a way similar to what has been described withreference to the graph b) of FIG. 26, where just the threshold TH3 isconsidered.

FIG. 28 is substantially similar to FIG. 27, differing only for the factthat the intermediate electrodes J₁₈ and J₃₅ are not in singleconfiguration, but are connected together in parallel and connected toone and the same input IN. A configuration of this type may be usefulfor limiting the number of connections to the intermediate electrodesprovided, albeit guaranteeing a good distinction of two thresholds(namely, the thresholds TH1 and TH2) associated to one and the sameinput IN.

With reference to the configurations described by way of example inFIGS. 27 and 28, and considering a larger number of sub-arrays or setsof electrodes connected in common (for example, five or moresub-arrays), a number of intermediate electrodes may be provided,connected in single configuration or else connected in pairs in parallelto one another.

FIG. 29 illustrates some circuit components used in a possible practicalimplementation of the invention. Part a) of the figure highlights themicrocontroller 24 used, here the aforementioned PIC16F1517 manufacturedby Microchip Technology Inc., with indication of the correspondinginputs and outputs. Part b) of the figure highlights the electrodes J,which here comprise electrodes J₁-J₁₇ connected in single configurationto respective inputs of the microcontroller 24, as well as electrodesJ₁₈-J₂₇ connected to respective inputs of the microcontroller 24 incommon or in parallel with electrodes J₂₈-J₃₇. There may be noted, onthe connection between each of the electrodes J₁-J₂₇ and thecorresponding input of the microcontroller 24, the aforementioned filterresistance, which may possibly be omitted. Part c) of FIG. 29illustrates a possible circuit diagram of a temperature sensor that canbe used in the device according to the invention, such as for examplethe temperature sensor 26 and/or 27 of FIG. 7. Finally, part d) of thefigure illustrates a possible communication port or electrical connectorbelonging to the circuit arrangement 23 of FIG. 7, which may be used forexample for programming and/or calibration of the level sensor in theproduction stage. Of course, the circuit arrangement 23 also includes apower-supply stage, not represented, in so far as it may be obtainedaccording to techniques in themselves known.

Thanks to its nature constituted by discrete detection elements, thesensor according to the invention is able to carry out measurements oflevel in a wide range of situations, which arise for example in SCRsystems. A first situation is the typical case, already describedpreviously, where the liquid contained in the tank is entirely in thefluid state. A second situation may arise in the case where the tank isoperating in conditions of low temperature, such as to cause totalfreezing of the liquid present in the tank. Also in this case, thesensor 10 is perfectly able to recognize the electrodes facing the icymass, and thus calculate its height. A third situation is the one inwhich the tank contains a predominant liquid part, floating or immersedin which are icy parts (“iceberg effect”): also in this case, themeasurement of level carried out by the sensor 10 may take place withthe modalities already described above, given that the presence of icyparts does not affect operation of the sensor 10 and calculation of thelevel. Similar considerations apply to the case where there exists adirect transition between liquid and ice.

The sensor 10 is also able to carry out detections in mixed situations,when the liquid-ice system is freezing or unfreezing. A case of thistype is illustrated schematically in FIG. 30, where in the upper part ofthe tank 1 icy liquid is present, designated by I, to form a partial ortotal “cap”. In the lower part of the tank 1, at a higher temperature,the contents L of the tank are already in the liquid state and presentbetween the solid part I and the liquid part L is air, designated by A,or vacuum. Such a condition may, for example, arise in the case of useof the liquid L contained in the tank before it has frozen completely orelse after partial unfreezing of the content of the tank that has beenobtained via a heater: in such a case, to the part of liquid used theresubstantially corresponds an intermediate area that is empty or with airbetween the liquid and the ice. According to one aspect of theinvention, in a condition of this sort, it is advantageous to detect thelevel of the liquid in order to prevent complete use thereof, i.e., inorder to leave at least part of liquid in the tank, for the reasonsclarified hereinafter.

Also in a condition of the type exemplified, the control electronics ofthe sensor 10 is able to identify correctly the presence of one or moreelectrodes (J₄, J₂₀) facing the liquid L, followed by the presence ofone or more electrodes (J₂₁, J₃₇) facing the air A, in turn followed byone or more electrodes (J₃₈, J_(n)) facing the ice I. Advantageously, ina situation of this type, the control electronics of the sensoraccording to the invention is able to define both the amount/level ofliquid content L, which is important in so far as it is the part thatcan be directly used at the moment by the SCR system, and the totalamount of liquid (L+I) present in the tank, which is important forplanning topping-up of the tank 1. A possible control logic that can beused for detecting the so-called “igloo effect” (presence of a layer ofair overlaid by a layer of ice) may be the following:

-   -   all the detection electrodes that are in the “dry” condition,        i.e., facing the air, are alone considered;    -   there is evaluated the information acquired on a certain number        of electrodes (for example, three) subsequent to a “dry”        electrode considered (where by “subsequent” electrodes is meant        the electrodes above the “dry” electrode considered, in the case        of installation of the sensor from beneath, or else below the        “dry” electrode considered, in the case of installation of the        sensor from above);    -   a check is made to verify whether above a “dry” electrode an        electrode from among the aforesaid subsequent electrodes—is        present that is facing the liquid; for this purpose, in a        preferred embodiment, the difference is computed between the        measurements made on the aforesaid subsequent electrodes and the        measurement made on the “dry” electrode considered, and the        three individual results are compared with absolute thresholds        defined in the design stage; if at least one of these        differences coincides or is in the given neighbourhood of the        threshold defined, there is detected the presence of the “igloo        effect”.

It is also possible that, starting from a situation of the typerepresented in FIG. 30, the tank is topped up, thus introducing a partof liquid L, which, however, may be blocked by the cap of ice I stillpresent in the tank 1. On the basis of the principles set forth above,also in this case the sensor according to the invention is evidentlyable to detect the increase of the total level of liquid present in thetank 1. Once again with reference to situations of the type representedin FIG. 30, it will be appreciated that, if need be, the electronics ofthe sensor 10 may be programmed for carrying out successive detections,spaced apart from one another by a certain period of time (for example,2 min), in order to detect progressive evolution of unfreezing of thecap of ice I.

As already mentioned, the electronics of the sensor forming the subjectof the invention is initialized and calibrated in the production stage,with storage of the corresponding software and of the correspondingvariables, amongst which one or more of the reference thresholds thatdepend upon the physical configuration of the sensor-tank system,amongst which the minimum thresholds representing the condition of anelectrode or a set of electrodes not facing the fluid. The minimumthreshold for the opposite case (liquid facing an electrode) may bepredefined following upon experiments and/or may be defined via afurther testing with the sensing part 11 of the sensor completelyimmersed in the liquid. In the case where the sensor 10 envisageselectrodes in parallel, also the intermediate thresholds between theminimum threshold and the maximum threshold are then definedexperimentally.

The temperature information that can be acquired via the sensor 27and/or 26 may be used by the electronics 23 for recognizing thesituation of the tank system, for example in order to deduce thecondition of freezing of the liquid and activate a corresponding heater,and/or in order to compensate mathematically the information on thelevel measurement, in particular in the case of applications at criticaltemperatures where the use of a differential measurement with thereference electrode might not be sufficient to guarantee errorcompensation.

It is emphasized that, to be able to cause via a heater unfreezing ofcertain icy liquids, such as the additive AdBlue considered herein, itis necessary for there to be in any case present in the tank a part ofunfrozen liquid in such a way that the heater can continue to heat theliquid and this transmits the heat to the icy mass. In the applicationto an SCR system, when the vehicle engine is started, the additive isdrawn off, and this is not a source of particular problems provided thatin the tank there still remains in any case a certain amount of heatedadditive, which can reach the icy mass as a result of the movement ofthe vehicle and consequent mixing of the hot liquid in the tank 1. If,instead, initial drawing-off of the additive determines emptying of theentire liquid residue contained in the tank, the thawing effect stops.For this reason, in a preferred embodiment, the sensor according to theinvention may be pre-arranged, for example at a software level, fordetecting the level of the thawed liquid so as to guarantee in any casethe presence of a minimum level thereof, sufficient for the thawingeffect not to be stopped. For this purpose, the sensor 10 can generatean appropriate signal or datum to the outside world, which may, forexample, be used by the electronics on board the vehicle and/or forissuing appropriate warnings.

It will of course be appreciated that, with the sensor forming thesubject of the invention, progressive thawing of the icy mass of liquidcan also be readily detected as thawing proceeds. The sensor 10 is ofcourse able to operate during heating and/or unfreezing of the liquid orother medium the level of which is to be measured, as well as in thecourse of its possible freezing.

The sensor 10 is interfaced with an external control system, such as acontrol unit of the SCR system, via the connector 12 b. For thispurpose, the control electronics 23 of the sensor is pre-arranged fortransmission of data, preferably in a serial format, very preferablyusing a SENT (Single-Edge Nibble Transmission) interface and/orprotocol. The signals sent may comprise, in addition to informationrepresenting the level of the medium being measured, also informationrepresenting at least one from among the temperature of the medium or ofthe air present in the tank, the presence of a condition of freezing orsolidification of at least part of the medium undergoing measurement,the presence of an anomalous operating condition, a warning and/or statesignal.

From what has been described previously, it may be appreciated howoperation of the level sensor described is substantially independent ofthe dielectric constant of the medium undergoing measurement. Thesensitive element represented by the array of electrodes is able tocarry out the measurement of level even if it is completely isolatedfrom the liquid, thereby guaranteeing its protection from contact withaggressive liquids, such as AdBlue or urea, and bestowing a goodmechanical strength on the structure of the sensor. In this perspective,the thickness of the wall of the casing 16, in particular in the areafacing the electrodes J, may be indicatively comprised between 0.1 and 5mm, preferably between 0.6 and 1 mm, very preferably approximately 0.8mm. As already mentioned, the casing may be replaced by a directovermoulding of plastic material on the sensitive element, or by ageneric wall for insulation of the electrodes J, with a thickness likethe one indicated above.

The sensor described may have any length and is hence readily adaptableto the inside of any container. A problem present in application oflevel sensors is precisely represented by the length of the sensor,i.e., the height of the level that is to be measured, which is avariable that depends upon the tank on which the sensor is installed. Inthis context, the invention enables:

-   -   use of a standardized electronics, i.e., a number of components        as small as possible, with a microcontroller that, given the        same or practically the same number of inputs, can handle a wide        range of lengths thanks to the possible connection in common or        parallel of a number of sub-arrays of electrodes; and    -   use of a highly flexible circuit diagram for the various        possible lengths required for the sensor, i.e., use of one and        the same microcontroller with the same number of inputs also for        level sensors of different lengths.

As already mentioned, by positioning for example 20 electrodes having aheight of 2 mm at a distance of 2 mm apart, a sensitive area for themeasurement of level having a length of 78 mm is obtained, i.e., asensitive area having a length of 78 mm for a set of first electrodes.When it is necessary to increase the length of the sensitive area, it ispossible to use the same number of inputs by providing second electrodesin parallel to the first. In this way, it is possible to maintain thesame microcontroller, both for reasons of cost and in terms of design.By way of non-limiting example, with ten sub-arrays of electrodes it isin theory possible to reach lengths close on 780 mm. For lengths of thissort it is on the other hand possible to reduce the number of sub-arraysof electrodes, in the case where a lower measurement sensitivity orresolution is acceptable at least in some parts or for some levels ofthe sensor. For this purpose, as already mentioned, it is for examplepossible to increase the distance between the electrodes in the areaswhere the measurement precision is less significant (such as a levelclose to the full-tank level) and reduce, instead, the distance toobtain a higher resolution in areas considered more critical (forexample, in the proximity of a minimum level in the tank).

In various embodiments described previously, installation of the sensor10 on the bottom wall of the tank has been assumed, in such a way thatthe electrode designated by J₁ represents the electrode set furthestdown in the tank itself. Obviously, as explained, installation of thesensor may be made also on the upper wall of the tank, in whichcase—with reference to the examples illustrated—the electrode J₁ is theone closest to the distal end of the portion 20 b of the substrate 20,and the electrode J is the one closest to the proximal end of theportion 20 b. Of course, the control software will be pre-arranged inorder to enable level detection according to the point where the sensoris installed, to a further advantage in the flexibility of use.

From the above description, the characteristics of the present inventionemerge clearly, as likewise its advantages, principally represented bythe simplicity of production of the level sensor proposed, by itscontained cost, by its precision and reliability, and by its highflexibility of use and configuration.

It is clear that numerous variations may be made to the devices and tothe methods described by way of example by the person skilled in theart, without thereby departing from the scope of the invention asdefined by the annexed claims.

According to possible variants of implementation or application, thelevel sensor forming the subject of the invention may be arranged on theoutside of the container or tank containing the medium undergoingmeasurement (i.e., on an outer wall or in a seat made in the outer wallof the container or tank), with the array of electrodes J set up againsta wall of the container, with possible interposition of the gel G or thelike. In this case, the aforesaid wall of the container is appropriatelyconfigured in terms of material and thickness in order to provide thelayer that insulates electrically the electrodes J with respect to theinside of the container 1. A possible example of embodiment isillustrated in FIG. 31, where the casing of the sensor body 10 is here acasing 16′ open laterally, in such a way that the front of the portion20 b of the substrate, and hence the electrodes J, face and/or are setup against a respective portion 16″ of a side wall 6 of the tank 1. Inthe example, this portion 16″, which here provides the insulation layerthat insulates the electrodes J electrically from the inside of the tank1, is thinned out with respect to the rest of the wall 6, for examplewith a thickness comprised between the aforementioned 0.1 and 5 mm.

According to other variant embodiments, the casing 16 and at least partof the corresponding characteristics described previously could becomprised in at least a part integrated in or associated to thecontainer or tank. As already mentioned, the electrodes could beassociated directly to a wall or portion of wall of the tank (forexample, the portion 16″ of FIG. 31), which in this case wouldconstitute both the substrate for the electrodes J and the insulationlayer with respect to the contents of the tank.

As mentioned previously, the measurements of capacitance necessary forimplementation of the invention may be carried out—in a direct orindirect way—also with sampling or measurement circuits different fromthose exemplified in FIGS. 21, 22, 25, and 30, such as for examplecircuits designed to convert the capacitance at an input IN into anequivalent resistance. For these cases, for instance, a modulator (suchas a modulator of a sigma-delta type) may be used for converting thecurrent measured via the aforesaid equivalent resistance into a digitalcount. When the medium L faces an electrode J, the capacitance increasesand the equivalent resistance decreases. This causes a variation(typically an increase) in the current through the resistance, with aconsequent variation (typically an increase) of the digital count, whichmay be considered as representing the presence of the medium in front ofthe electrode. Also in implementations of this type, the value of countdetermined each time at the input IN considered may be compared with oneor more reference thresholds and/or be a differential value with respectto one or more reference electrodes, with an approach similar to the onedescribed previously in relation to measurements of capacitance basedupon voltage values.

An example in this sense is illustrated schematically in FIG. 32, wherethe block designated by C_(J) represents schematically the capacitanceassociated to the electrode J or to the set of electrodes J each timeundergoing measurement. In this example, a sampling circuit CP isprovided, where the capacitance C_(J) (for example, the set ofelectrodes J₄, J₂₁ and J₃₈) provides, together with the switches S₁ andS₂, a switched-capacitor circuit. The two switches are controlled viatwo clocks or timing circuits complementary to one another, notrepresented. In this way, when the switch S₁ is closed, the capacitanceC_(J) is charged by the voltage V, with the charge in C_(J) that ishence Q=C_(J)V. When S₂ is closed and S₁ is open, the charge is removedfrom C_(J). If the switching frequency of the switches S₁ and S₂ is Fs,the charge Q=C_(J)V is transferred at the rate Fs: consequently, therate of charge transfer per unit time (current) isI_(CS)=qFs=C_(J)F_(S)V.

This equation indicates that the current I_(CS), that theswitched-capacitor circuit draws from the analog bus Mux, is directlyproportional to the capacitance C_(J). The converter IDAC supplies aconstant current to the analog bus Mux whenever the output Q of theflip-flop D is high and does not instead supply current when the outputQ of the flip-flop D is low. The output Q of the flip-flop D isbasically the output of the comparator CMP, synchronized with a countclock CL. The current I_(CM) that a reference capacitor C_(MOD) drawsfrom the analog bus Mux is the difference between the current suppliedby the converter IDAC and the current drawn off by theswitched-capacitor circuit. The voltage V across the capacitance C_(J)is connected to the inverting input (−) of the comparator CMP, whereasthe non-inverting input (+) is connected to a reference voltage V_(REF).

When the capacitance C_(J) increases (owing to the presence of themedium L in front of an electrode J), the current I_(CS) increasesproportionally. The output of the comparator CMP is a PWM signal, andits duty cycle is proportional to the value of C_(J). This duty cycle ismeasured via a suitable counter: given that, as has been explained, thecapacitance of the electrodes J—and hence the capacitance C_(J)—isaffected by the presence or otherwise of the medium L, it is possible todeduce from the aforesaid count which electrode or electrodes J arefacing the medium L and which ones are not. Also in this case, the valueof count determined each time at the input IN considered (possibly adifferential value with respect to one or more reference electrodes) iscompared via control or comparators means of the controller 24 with oneor more reference thresholds, with an approach similar to the onedescribed previously in relation to measurements of capacitance basedupon voltage values.

Merely way of example, commercially available microcontrollers suitablefor the application exemplified with reference to FIG. 32 may be thoseidentified by the codes CY8C24894-24LFXA and CY8C4245AXI, marketed byCypress Semiconductor Corporation, San Jose, Calif., U.S.A.

The invention has been described with particular reference to detectionof the level of a liquid medium, in particular a urea-based additive,but, as already mentioned, the sensor described may be used incombination with different substances and materials, even potentiallysubject to solidification for reasons different from freezing (forexample, a mass of a powdery or similar material a part of which iscompacted or solidified, for example on account of excessive humidity).

The invention claimed is:
 1. A sensor for detecting the level of amedium contained in a container, the sensor comprising: an array ofcapacitive elements designed to be associated to the container, so as toextend according to an axis of detection of the level of the medium, thearray of capacitive elements comprising a plurality of electrodes on oneface of an electrically insulating substrate having a generallyelongated shape, the electrodes being spaced apart from one anotheralong the detection axis, and being substantially coplanar with oneanother; at least one insulation layer for insulating electrically theelectrodes with respect to the inside of the container; and a controllerhaving a plurality of inputs, wherein the controller comprises or hasassociated a capacitance measuring circuit, wherein each capacitiveelement comprises a set of electrodes connected together in parallel,each set of electrodes being connected to a respective input of theplurality of inputs, wherein the controller comprises or has associateda circuit arrangement operable for connecting selectively each input ofthe plurality of inputs to the capacitance measuring circuit and forconnecting to ground or to a reference voltage one or more of the inputsof the plurality of inputs different from the input each time connectedto the capacitance measuring circuit, wherein the controller ispre-arranged for discriminating a value of capacitance associated toeach electrode in order to deduce the level of the medium present in thecontainer, wherein a digital count determined at said input, or avoltage determined at said input, is a differential digital count orvoltage, respectively, the controller being pre-arranged for computing adifference between a raw digital count data or a raw voltage datacorresponding to said input and a raw digital count data or a rawvoltage data corresponding to an input of the plurality of inputs thatis connected to at least one reference electrode, and wherein thecontroller comprises or has associated a control circuit for comparing avalue of the differential digital count or voltage with at least onereference threshold or value.
 2. The level sensor according to claim 1,wherein: the capacitance measuring circuit comprises a sampling circuitoperatively connected or connectable to each input of the plurality ofinputs, which includes a controllable switch and a capacitor, thecontrollable switch being switchable between a first position, where thecapacitor is connected to a given voltage source, and a second position,where the capacitor is connected to the respective set of electrodes,and the controller comprises or has associated a switching device,operable for switching the switch from the first position to the secondposition in order to discharge the capacitor in a way proportional tothe value of capacitance associated to the corresponding set ofelectrodes.
 3. The level sensor according to claim 1, wherein thecapacitance measuring circuit comprises a conversion circuit operativelyconnected or connectable to each input of the plurality of inputs, theconversion circuit being configured for converting an input capacitanceinto an equivalent resistance and for converting a current measured viathe equivalent resistance into a digital count representing a value ofcapacitance.
 4. The level sensor according to claim 1, wherein thecontrol circuit comprises a comparator circuit, for comparing thedigital count determined at said input, or the voltage determined atsaid input, with said at least one reference threshold or value, inorder to deduce whether the medium is facing or is not facing anelectrode of the set of electrodes.
 5. The level sensor according toclaim 3, wherein: each set of electrodes comprises at least one firstelectrode and one second electrode connected together in parallel; andthe control circuit is pre-arranged for comparing the digital countdetermined at said input, or the voltage determined at said input, withat least two corresponding reference thresholds or values, in order todeduce whether the medium is facing or is not facing the first electrodeand/or the second electrode.
 6. The level sensor according to claim 1,wherein: the at least one reference threshold or value comprisesreference thresholds which are in a number corresponding to the numberof electrodes of one said set increased by one, or else in a numbercorresponding to the number of electrodes of one said set; and thecontrol circuit is pre-arranged for controlling or comparing the digitalcount determined at said input, or the voltage determined at said input,with each of the reference thresholds or values, in order to deducewhether each of the electrodes of said set is facing or is not facingthe medium.
 7. The level sensor according to claim 1, wherein theelectrodes of respective sets form on the electrically insulatingsubstrate respective sub-arrays of electrodes arranged in sequence alonga detection axis, wherein, given a number y of first electrodesconnected in parallel to second electrodes, set between each firstelectrode and the corresponding second electrode are y-1 electrodes. 8.The level sensor according to claim 1, wherein: at least a portion ofthe electrically insulating substrate is set up against the insulationlayer at a face thereof provided with a plurality of electrodes at leastpartially in contact with the insulation layer, at a front of thecorresponding electrodes; and/or between the insulation layer and theface of the electrically insulating substrate carrying the plurality ofelectrodes a filling material is present, the filling material being setbetween the insulation layer and the aforesaid face and/or front of theelectrodes.
 9. The level sensor according to claim 1, wherein the arrayof capacitive elements is contained in an electrically insulating andfluid-tight casing, which defines said at least one insulation layer andis configured for being set within the container according to adetection axis, the casing being a casing defining a respective cavityfor insertion of the electrically insulating substrate carrying theelectrodes or else being a casing overmoulded on at least one part ofthe electrically insulating substrate carrying the electrodes, thecasing belonging to a body of the sensor.
 10. The level sensor accordingto claim 1, comprising an electrically insulating substrate carrying theelectrodes, wherein the substrate: has a first portion carrying theplurality of electrodes and a second portion carrying a circuitarrangement including the controller, on the substrate there beingprovided electrically conductive paths for electrical connection of theelectrodes; and/or has associated at least one temperature sensor;and/or has a distal end that is spaced apart from a distal end of acorresponding casing, for compensation of any possible expansion; and/orhas associated at least one reference electrode in at least one of adistal end portion and a proximal end portion thereof; and/or hasassociated a plurality of reference electrodes, such as at least tworeference electrodes, each to a respective end of an array of theplurality of electrodes or else reference electrodes set betweensub-arrays of detection electrodes; and/or has associated a plurality ofreference electrodes, each of which is connected to a respective inputof the controller or at least some of which are connected in parallel toone and the same input of the controller; and/or has first electrodes ofthe plurality of electrodes closer to one another in the direction ofthe detection axis with respect to second electrodes of the plurality ofelectrodes, the first electrodes determining a higher measurementresolution than the one determined by the second electrodes.
 11. Thelevel sensor according to claim 1, wherein the controller ispre-arranged for detecting one or more of the following conditions: themedium contained in the container is entirely in the fluid state; themedium contained in the container has passed entirely from a fluid stateto a solid or frozen state; the medium contained in the container has apredominant fluid part floating or immersed in which are parts of themedium in the solid or frozen state; the medium contained in thecontainer is passing from a fluid state to a state solid or vice versa,such as freezing or unfreezing; the medium contained in the containerincludes at least one first part in the solid or frozen state and onesecond part in the fluid or liquid state, between the first part and thesecond part there being set a layer of air or gas; the medium containedin the container comprises at least one part in the solid or frozenstate overlaid by a part in the fluid or liquid state.
 12. A method forcontrolling a sensor for detecting the level of a medium contained in acontainer according to claim 1, the sensor having the plurality ofelectrodes arranged according to the array that extends according to anaxis of detection of the level of the medium, said method comprising thesteps of: i) acquiring electrical signals via first electrodes, which donot face the medium; ii) acquiring electrical signals via a certainnumber of second electrodes that are at a greater height than a firstelectrode considered; iii) verifying whether above the first electrodeconsidered at least one electrode, from among the aforesaid secondelectrodes, is present that is facing the medium, and thereby deducingthat the medium contained in the container comprises at least one partin the solid or frozen state that overlies a layer of air or gas,wherein step iii) comprises: computing the difference between the valuesrepresenting electrical signals acquired via said second electrodes, andthe value representing the electrical signal acquired via the firstelectrode considered, to compare the individual results with at leastone pre-defined value or threshold; and if at least one of thedifferences coincides with or is within a given neighbourhood of thepre-defined value or threshold, deducing that the medium contained inthe container comprises at least one part in the solid or frozen statethat overlies a layer of air or gas.
 13. A container pre-arranged forcoupling with a level sensor according to claim
 1. 14. A sensor fordetecting the level of a medium contained in a container, the sensorcomprising: an array of capacitive elements designed to be associated tothe container, so as to extend according to an axis of detection of thelevel of the medium, the array of capacitive elements comprising aplurality of electrodes on one face of an electrically insulatingsubstrate having a generally elongated shape, the electrodes beingspaced apart from one another along the detection axis, and beingsubstantially coplanar with one another; at least one insulation layerfor insulating electrically the electrodes with respect to the inside ofthe container; and a controller having a plurality of inputs, whereinthe controller comprises or has associated a capacitance measuringcircuit, wherein each capacitive element comprises a set of electrodesconnected together in parallel, each set of electrodes being connectedto a respective input of the plurality of inputs, wherein the controllercomprises or has associated a circuit arrangement operable forconnecting selectively each input of the plurality of inputs to thecapacitance measuring circuit and for connecting to ground or to areference voltage one or more of the inputs of the plurality of inputsdifferent from the input each time connected to the capacitancemeasuring circuit, wherein the controller is pre-arranged fordiscriminating a value of capacitance associated to each electrode inorder to deduce the level of the medium present in the container,wherein the array of capacitive elements is contained in an electricallyinsulating and fluid-tight casing, which defines said at least oneinsulation layer and is configured for being set within the containeraccording to a detection axis, the casing being a casing overmoulded onat least one part of the electrically insulating substrate carrying theelectrodes, the casing belonging to a body of the sensor comprises asensor body having positioning means configured for urging at least aportion of an electrically insulating substrate carrying the electrodestowards the insulation layer, the positioning means being preferablyelastically compliant and/or deformable.
 15. A level sensor fordetecting the level of a medium contained in a container, the levelsensor comprising: an array of capacitive elements designed to beassociated to the container, so as to extend according to an axis ofdetection of the level of the medium and comprising a plurality ofelectrodes on one face of an electrically insulating substrate having agenerally elongated shape, the electrodes being spaced apart from oneanother along the detection axis, and being substantially coplanar withone another; at least one insulation layer for insulating electricallythe plurality of electrodes with respect to the inside of the container;a control circuit having a plurality of inputs connected to which arethe electrodes of the plurality of electrodes, the control circuit beingpre-arranged in order to deduce the level of the medium present in thecontainer on the basis of electrical signals acquired via the pluralityof electrodes; wherein the control circuit is pre-arranged fordiscriminating a value of capacitance associated to each electrode ofthe plurality; wherein the control circuit comprises a capacitancemeasuring circuit and a circuit arrangement pre-arranged for connectingselectively each input of the plurality of inputs to the capacitancemeasuring circuit and for connecting to ground or to a reference voltageone or more of the inputs of the plurality of inputs different from theinput each time connected to the capacitance measuring circuit, whereinthe control circuit is pre-arranged for carrying out a differentialmeasurement between at least one detection electrode and a referenceelectrode which belongs to said plurality of electrodes, by: acquiringat least one first raw data representative of a capacitance valueassociated to the at least one detection electrode, and at least onesecond raw data representative of a capacitance value associated to theat least one reference electrode, and calculating a difference betweenthe at least one first raw data and the at least one second raw data,and wherein the control circuit is prearranged for comparing saiddifference with at least one threshold, to deduce the level of themedium present in the container.
 16. The level sensor according to claim14, wherein at least one temperature sensor is set on the electricallyinsulating substrate, connected to a respective input of the controlcircuit, the control circuit being pre-arranged for compensating, basedon detections carried out via said at least one temperature sensor,thermal drifts possibly affecting the at least one first raw data andthe at least one second raw data.
 17. The level sensor according toclaim 15, wherein the at least one first raw data and the at least onesecond raw data are voltage values or else are digital counts.
 18. Thelevel sensor according to claim 15, wherein the at least one referenceelectrode comprises the lowermost electrode of the plurality, withrespect to a bottom of the container.
 19. The level sensor according toclaim 15, wherein the control circuit is pre-arranged for selecting anyof the electrodes of the plurality as reference electrode, in order tocarry out said differential measurement.
 20. The level sensor accordingto claim 15, wherein the control circuit is operable for: carrying out asequential sampling of all the electrodes of the plurality, to acquirethe corresponding raw datum, calculating the difference between the rawdata of each detection electrode and the raw data of the at least onereference electrode, comparing the difference pertaining to eachdetection electrode with the at least threshold, and if at least one ofthe calculated differences is below the at least one threshold, deducingthat the corresponding detection electrode is at least partially facingthe medium contained in the container.